2018-09-17 10:33:56 +00:00
< 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/Payment/Save')}}" method = "POST" request-type = "ajax-url" request-value = "{{:U('Admin/Payment/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('payment_edit_name')}}< / span >
< a href = "{{:U('Admin/Payment/Index')}}" class = "fr fs-14 m-t-5 am-icon-mail-reply" > {{:L('common_operation_back')}}< / a >
< / legend >
< div class = "am-form-group" >
< label > {{:L('payment_name_text')}}< / label >
< input type = "text" name = "name" placeholder = "{{:L('payment_name_text')}}" minlength = "2" maxlength = "60" data-validation-message = "{{:L('payment_name_format')}}" class = "am-radius" < notempty name = "data" > value="{{$data.name}}"< / notempty > required />
< / div >
< div class = "am-form-group" >
< label > {{:L('payment_apply_terminal_text')}}< / label >
2018-09-18 09:35:29 +00:00
< select name = "apply_terminal" class = "am-radius c-p chosen-select" multiple = "multiple" minchecked = "1" data-placeholder = "{{:L('common_select_can_choose')}}" data-validation-message = "{{:L('payment_apply_terminal_format')}}" required >
2018-09-17 10:33:56 +00:00
< foreach name = "common_apply_terminal_list" item = "v" >
< option value = "{{$v.value}}" < if condition = "isset($data['apply_terminal']) and in_array($v['value'], $data['apply_terminal'])" > selected< / if > >{{$v.name}}< / option >
< / foreach >
< / select >
< / div >
< div class = "am-form-group am-form-file" >
< label class = "block" > {{:L('payment_logo_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 = "logo" class = "am-radius js-choice-one original-images-url" data-choice-one-to = ".images-file-event" < notempty name = "data" > value="{{$data.logo}}"< / notempty > " data-validation-message="{{:L('common_select_images_tips')}}" readonly="readonly" < notempty name = "data" > value="{{$data.logo}}"< / notempty > />
< input type = "file" name = "file_logo" multiple data-validation-message = "{{:L('common_select_images_tips')}}" accept = "image/gif,image/jpeg,image/jpg,image/png" class = "js-choice-one images-file-event" data-choice-one-to = ".original-images-url" data-tips-tag = "#form-logo-tips" data-image-tag = "#form-img-logo" / >
< div id = "form-logo-tips" class = "m-t-5" > < / div >
< img src = "<if condition=" ! empty ( $ data [ ' logo ' ] ) " > {{$image_host}}{{$data.logo}}< else / > {{$image_host}}/Public/Admin/Default/Images/default-images.png< / if > " id="form-img-logo" class="block m-t-5 am-img-thumbnail am-radius" width="100" data-default="< if condition = "!empty($data['logo'])" > {{$image_host}}{{$data.logo}}< else / > {{$image_host}}/Public/Admin/Default/Images/default-images.png< / if > " />
< / div >
2018-09-19 04:32:33 +00:00
<!-- plugins config start -->
2018-09-17 10:33:56 +00:00
< notempty name = "data.element" >
2018-09-19 04:32:33 +00:00
< div class = "plugins-element" >
< p class = "tips" > {{:L('payment_plugins_element_tips')}}< / p >
2018-09-18 09:35:29 +00:00
< foreach name = "data.element" item = "element" >
< div class = "am-form-group" >
< label class = "block" > {{$element.title}}< / label >
< switch name = "element.element" >
< case value = "input" >
< if condition = "in_array($element['type'], ['radio', 'checkbox']) and !empty($element['element_data']) and is_array($element['element_data'])" >
< foreach name = "element.element_data" key = "element_data_key" item = "element_data" >
< label class = "<if condition=" isset ( $ element [ ' is_block ' ] ) and $ element [ ' is_block ' ] eq 1 " > am-{{$element.type}}< else / > am-{{$element.type}}-inline< / if > ">
< input
type="{{$element.type}}"
2018-09-19 04:32:33 +00:00
name="plugins_{{$element.name}}"
2018-09-18 09:35:29 +00:00
value="{{$element_data.value}}"
< if condition = "(isset($element_data['is_checked']) and $element_data['is_checked'] eq 1) or (isset($data['config'][$element['name']]) and in_array($element_data['value'], explode(',', $data['config'][$element['name']])))" > checked< / if >
< if condition = "isset($element['minchecked']) and $element['type'] eq 'checkbox'" > minchecked="{{$element.minchecked}}"< / if >
< if condition = "isset($element['maxchecked']) and $element['type'] eq 'checkbox'" > maxchecked="{{$element.maxchecked}}"< / if >
< if condition = "isset($element['message'])" > data-validation-message="{{$element.message}}"< / if >
< if condition = "$element_data_key eq 0 and isset($element['is_required']) and $element['is_required'] eq 1" > required< / if >
data-am-ucheck />{{$element_data.name}}
< / label >
< / foreach >
< else / >
< input
2018-09-18 09:52:17 +00:00
class="am-radius"
2018-09-18 09:35:29 +00:00
type="{{$element.type}}"
2018-09-19 04:32:33 +00:00
name="plugins_{{$element.name}}"
2018-09-18 09:52:17 +00:00
value="< if condition = "isset($data['config'][$element['name']])" > {{$data['config'][$element['name']]}}< else / > < if condition = "isset($element['default'])" > {{$element.default}}< / if > < / if > "
2018-09-18 09:35:29 +00:00
< if condition = "isset($element['placeholder'])" > placeholder="{{$element.placeholder}}"< / if >
< if condition = "isset($element['message'])" > data-validation-message="{{$element.message}}"< / if >
< if condition = "isset($element['is_required']) and $element['is_required'] eq 1" > required< / if >
/>
< / if >
< / case >
< case value = "select" >
< if condition = "!empty($element['element_data']) and is_array($element['element_data'])" >
< select
2018-09-18 09:52:17 +00:00
class="chosen-select am-radius"
2018-09-19 04:32:33 +00:00
name="plugins_{{$element.name}}"
2018-09-18 09:35:29 +00:00
< if condition = "isset($element['message'])" > data-validation-message="{{$element.message}}"< / if >
< if condition = "isset($element['placeholder'])" > data-placeholder="{{$element.placeholder}}"< else / > {{:L('common_select_can_choose')}}< / if >
< if condition = "isset($element['is_multiple']) and $element['is_multiple'] eq 1" >
multiple
< if condition = "isset($element['minchecked'])" > minchecked="{{$element.minchecked}}"< / if >
< if condition = "isset($element['maxchecked'])" > maxchecked="{{$element.maxchecked}}"< / if >
< / if >
< if condition = "isset($element['is_required']) and $element['is_required'] eq 1" > required< / if >
>
< if condition = "!isset($element['is_multiple']) or $element['is_multiple'] neq 1" >
< option value = "" > < if condition = "isset($element['placeholder'])" > {{$element.placeholder}}< else / > {{:L('common_select_can_choose')}}< / if > < / option >
< / if >
< foreach name = "element.element_data" key = "element_data_key" item = "element_data" >
< option
value="{{$element_data.value}}"
< if condition = "(isset($element_data['is_selected']) and $element_data['is_selected'] eq 1) or (isset($data['config'][$element['name']]) and in_array($element_data['value'], explode(',', $data['config'][$element['name']])))" > selected< / if >
>{{$element_data.name}}< / option >
< / foreach >
< / select >
< / if >
< / case >
2018-09-18 09:52:17 +00:00
< case value = "textarea" >
< textarea
class="am-radius"
2018-09-19 04:32:33 +00:00
name="plugins_{{$element.name}}"
2018-09-18 09:52:17 +00:00
< if condition = "isset($element['rows'])" > rows="{{$element.rows}}"< / if >
< if condition = "isset($element['placeholder'])" > placeholder="{{$element.placeholder}}"< / if >
2018-09-19 04:32:33 +00:00
< if condition = "isset($element['is_required']) and $element['is_required'] eq 1" >
< if condition = "isset($element['minlength'])" > minlength="{{$element.minlength}}"< / if >
< if condition = "isset($element['maxlength'])" > maxlength="{{$element.maxlength}}"< / if >
required
< / if >
2018-09-18 09:52:17 +00:00
>< if condition = "isset($data['config'][$element['name']])" > {{$data['config'][$element['name']]}}< else / > < if condition = "isset($element['default'])" > {{$element.default}}< / if > < / if > < / textarea >
< / case >
2018-09-18 09:35:29 +00:00
< / switch >
< / div >
< / foreach >
< / div >
2018-09-17 10:33:56 +00:00
< / notempty >
2018-09-19 04:32:33 +00:00
<!-- plugins config end -->
2018-09-17 10:33:56 +00:00
2018-09-18 09:35:29 +00:00
< div class = "am-form-group" >
< label > {{:L('common_view_sort_title')}}< / label >
< input type = "number" placeholder = "{{:L('common_view_sort_title')}}" name = "sort" min = "0" max = "255" data-validation-message = "{{:L('common_sort_error')}}" class = "am-radius" value = "<if condition=" isset ( $ data [ ' sort ' ] ) " > {{$data.sort}}< else / > 0< / if > " required />
< / div >
2018-10-04 17:46:58 +00:00
< div class = "am-form-group" >
< label class = "block" > {{:L('payment_is_open_user_text')}}< / label >
< input name = "is_open_user" value = "1" type = "checkbox" data-off-text = "{{:L('common_operation_off_is_text')}}" data-on-text = "{{:L('common_operation_on_is_text')}}" data-size = "xs" data-on-color = "success" data-off-color = "default" data-handle-width = "50" data-am-switch < if condition = "(isset($data['is_open_user']) and $data['is_open_user'] eq 1) or !isset($data['is_open_user'])" > checked="true"< / if > />
< / div >
2018-09-17 10:33:56 +00:00
< div class = "am-form-group" >
< label class = "block" > {{:L('common_view_enable_title')}}< / label >
< input name = "is_enable" value = "1" type = "checkbox" data-off-text = "{{:L('common_operation_off_is_text')}}" data-on-text = "{{:L('common_operation_on_is_text')}}" data-size = "xs" data-on-color = "success" data-off-color = "default" data-handle-width = "50" data-am-switch < if condition = "(isset($data['is_enable']) and $data['is_enable'] eq 1) or !isset($data['is_enable'])" > checked="true"< / if > />
< / div >
< div class = "am-form-group" >
< input type = "hidden" name = "id" < notempty name = "data" > value="{{$data.id}}"< / notempty > />
< 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" / >
2018-09-18 09:35:29 +00:00
<!-- footer end -->
< script >
$('.select-maxchecked').on('checkedOverflow.selected.amui', function() {
Prompt('最多选择' + this.getAttribute('maxchecked') + '项');
});
< / script >