feat/task1-c-wallet
parent
56ec682171
commit
235c8435bb
|
|
@ -0,0 +1,7 @@
|
|||
<ul class="am-nav am-nav-pills table-nav m-b-10">
|
||||
<foreach name="alipay_life_message_send_type_list" item="v">
|
||||
<li <if condition="$send_type eq $v['value']">class="am-active"</if> data-type="{{$v.value}}">
|
||||
<a href="{{:U('Admin/AlipayLifeMessage/SaveInfo', array_merge($params, ['send_type'=>$v['value']]))}}">{{$v.name}}</a>
|
||||
</li>
|
||||
</foreach>
|
||||
</ul>
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
<include file="Public/Header" />
|
||||
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation view-save" action="{{:U('Admin/AlipayLifeMessage/Save')}}" method="POST" request-type="ajax-url" request-value="{{:U('Admin/AlipayLifeMessage/Index')}}" enctype="multipart/form-data">
|
||||
<input type="hidden" name="max_file_size" value="{{:MyC('home_max_limit_image', 2048000)}}" />
|
||||
<legend>
|
||||
<span class="fs-16">{{:L('alipay_life_message_add_name')}}</span>
|
||||
<a href="{{:U('Admin/AlipayLifeMessage/Index')}}" class="fr fs-14 m-t-5 am-icon-mail-reply"> {{:L('common_operation_back')}}</a>
|
||||
</legend>
|
||||
|
||||
<!-- table nav start -->
|
||||
<include file="Nav" />
|
||||
<!-- table nav end -->
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('alipay_life_message_send_type_text')}}</label>
|
||||
<select name="send_type" class="am-radius c-p chosen-select" data-placeholder="{{:L('common_select_can_choose')}}" data-validation-message="{{:L('alipay_life_message_send_type_format')}}" disabled required>
|
||||
<option value="">{{:L('common_select_can_choose')}}</option>
|
||||
<foreach name="alipay_life_message_send_type_list" item="v">
|
||||
<option value="{{$v.value}}" <if condition="isset($send_type) and $v['value'] eq $send_type">selected</if>>{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
<if condition="$send_type eq 1">
|
||||
<empty name="params.alipay_life_id">
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('alipay_life_message_category_text')}}</label>
|
||||
<select name="alipay_life_category_id" class="am-radius c-p chosen-select" multiple="multiple" data-placeholder="{{:L('common_select_can_choose')}}" data-validation-message="{{:L('alipay_life_message_category_format')}}" required>
|
||||
<foreach name="alipay_life_category" item="v">
|
||||
<option value="{{$v.id}}">{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
</empty>
|
||||
|
||||
<notempty name="params.alipay_life_id">
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('alipay_life_message_life_text')}}</label>
|
||||
<select name="alipay_life_id" class="am-radius c-p chosen-select" data-placeholder="{{:L('common_select_can_choose')}}" data-validation-message="{{:L('alipay_life_message_life_format')}}" <notempty name="params.alipay_life_id">disabled</notempty> required>
|
||||
<foreach name="alipay_life_list" item="v">
|
||||
<option value="{{$v.id}}" <if condition="$params['alipay_life_id'] eq $v['id']">selected</if>>{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
</notempty>
|
||||
<else />
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('alipay_life_message_user_text')}}</label>
|
||||
<input type="hidden" name="user_id" value="{{$params.user_id}}" />
|
||||
<input type="hidden" name="alipay_life_user_id" value="{{$params.alipay_life_user_id}}" />
|
||||
<input type="text" class="am-radius" value="{{$alipay_openid}}" disabled />
|
||||
</div>
|
||||
</if>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('alipay_life_message_title_text')}}</label>
|
||||
<input type="text" name="title" placeholder="{{:L('alipay_life_message_title_text')}}" maxlength="80" data-validation-message="{{:L('alipay_life_message_title_format')}}" class="am-radius" required />
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('alipay_life_message_content_text')}}</label>
|
||||
<textarea rows="5" name="content" class="am-radius" placeholder="{{:L('alipay_life_message_content_text')}}" data-validation-message="{{:L('alipay_life_message_content_format')}}" maxlength="250" required></textarea>
|
||||
</div>
|
||||
|
||||
<if condition="$nav_type eq 1">
|
||||
<div class="am-form-group am-form-file">
|
||||
<label class="block">{{:L('alipay_life_message_image_url_text')}}</label>
|
||||
<button type="button" class="am-btn am-btn-default am-btn-sm am-radius">
|
||||
<i class="am-icon-cloud-upload"></i> {{:L('common_select_images_text')}}</button>
|
||||
<input type="text" name="image_url" class="am-radius js-choice-one original-images-url original-icon-images-url" data-choice-one-to='input[name="file_image_url"]' data-validation-message="{{:L('alipay_life_message_image_url_format')}}" readonly="readonly" required />
|
||||
<input type="file" name="file_image_url" multiple data-validation-message="{{:L('alipay_life_message_image_url_format')}}" accept="image/gif,image/jpeg,image/jpg,image/png" class="js-choice-one images-file-event file_image_url-tag" data-choice-one-to=".original-icon-images-url" data-tips-tag="#form-icon-tips" data-image-tag="#form-img-icon" required />
|
||||
<div id="form-icon-tips" class="m-t-5"></div>
|
||||
<img src="{{$image_host}}/Public/Admin/Default/Images/default-images.png" id="form-img-icon" class="block m-t-5 am-img-thumbnail am-radius" width="100" height="100" data-default="{{$image_host}}/Public/Admin/Default/Images/default-images.png" />
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('alipay_life_message_url_text')}}</label>
|
||||
<input type="text" name="url" placeholder="{{:L('alipay_life_message_url_text')}}" data-validation-message="{{:L('alipay_life_message_url_format')}}" class="am-radius" maxlength="255" required />
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('alipay_life_message_action_name_text')}}</label>
|
||||
<input type="text" name="action_name" placeholder="{{:L('alipay_life_message_action_name_text')}}" data-validation-message="{{:L('alipay_life_message_action_name_format')}}" class="am-radius" maxlength="60" />
|
||||
</div>
|
||||
</if>
|
||||
<div class="am-form-group">
|
||||
<input type="hidden" name="type" value="{{$nav_type}}" />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
<!-- footer start -->
|
||||
<include file="Public/Footer" />
|
||||
<!-- footer end -->
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
$(function()
|
||||
{
|
||||
// 添加元素到右侧
|
||||
function RightElementAdd(value, name)
|
||||
{
|
||||
if($('ul.ul-right').find('.items-li-'+value).length == 0)
|
||||
{
|
||||
var html = '<li class="items-li-'+value+'"><span class="name" data-value="'+value+'">'+name+'</span><i class="am-icon-trash-o am-fr"></i></li>';
|
||||
$('ul.ul-right').append(html);
|
||||
}
|
||||
}
|
||||
// 左侧点击到右侧
|
||||
$('ul.ul-left i.am-icon-angle-right').on('click', function()
|
||||
{
|
||||
var value = $(this).prev().data('value');
|
||||
var name = $(this).prev().text();
|
||||
RightElementAdd(value, name);
|
||||
$(this).parent().remove();
|
||||
return false;
|
||||
});
|
||||
|
||||
// 左侧全部移动到右侧
|
||||
$('.selected-all').on('click', function()
|
||||
{
|
||||
$('ul.ul-left li').each(function(k, v)
|
||||
{
|
||||
var value = $(this).find('span.name').data('value');
|
||||
var name = $(this).find('span.name').text();
|
||||
RightElementAdd(value, name);
|
||||
$(this).remove();
|
||||
});
|
||||
});
|
||||
|
||||
// 右侧删除
|
||||
$('ul.ul-right i.am-icon-trash-o').on('click', function()
|
||||
{
|
||||
$(this).parent().remove();
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
Loading…
Reference in New Issue