vr-shopxo-source/application/admin/view/default/apphomenav/save_info.html

93 lines
5.7 KiB
HTML
Executable File

{{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="{{:url('Admin/AppHomeNav/Save')}}" method="POST" request-type="ajax-url" request-value="{{:url('Admin/AppHomeNav/Index')}}" enctype="multipart/form-data">
<input type="hidden" name="max_file_size" value="{{:MyC('home_max_limit_image', 2048000)}}" />
<legend>
<span class="fs-16)}}
{{if empty($data['id'])}}
导航添加
{{else /}}
导航编辑
{{/if}}
</span>
<a href="{{:url('Admin/AppHomeNav/Index')}}" class="fr fs-14 m-t-5 am-icon-mail-reply"> 返回</a>
</legend>
<div class="am-form-group">
<label>名称</label>
<input type="text" name="name" placeholder="名称" minlength="2" maxlength="60" data-validation-message="名称格式 2~60 个字符" class="am-radius" <notempty name="data"> value="{{$data.name}}"{{/if}} required />
</div>
<div class="am-form-group">
<label>所属平台</label>
<select name="platform" class="am-radius chosen-select" data-placeholder="可选择..." placeholder="所属平台有误">
<option value="">可选择...</option>
<foreach name="common_platform_type" item="v">
{{if !in_array($v['value'], ['pc'])}}
<option value="{{$v.value}}" {{if isset($data['platform']) and $data['platform'] eq $v['value']">selected{{else /}}{{if !isset($data['platform']) and isset($v['checked']) and $v['checked'] eq true">selected{{/if}}{{/if}}>{{$v.name}}</option>
{{/if}}
{{/foreach}}
</select>
</div>
<div class="am-form-group">
<label>事件类型</label>
<select name="event_type" class="am-radius chosen-select" data-placeholder="可选择..." placeholder="事件值类型有误">
<option value="">可选择...</option>
<foreach name="common_app_event_type" item="v">
<option value="{{$v.value}}" {{if isset($data['event_type']) and $data['event_type'] eq $v['value']">selected{{else /}}{{if !isset($data['event_type']) and isset($v['checked']) and $v['checked'] eq true">selected{{/if}}{{/if}}>{{$v.name}}</option>
{{/foreach}}
</select>
</div>
<div class="am-form-group">
<div class="am-alert am-alert-warning am-radius" data-am-alert>
<button type="button" class="am-close">&times;</button>
<p>{{:lang('common_app_event_type_tips')}}</p>
</div>
<label>事件值</label>
<input type="text" name="event_value" placeholder="事件值" data-validation-message="事件值最多 255 个字符" class="am-radius" <notempty name="data"> value="{{$data.event_value}}"{{/if}} />
</div>
<div class="am-form-group am-form-file">
<label class="block">导航图标</label>
<button type="button" class="am-btn am-btn-default am-btn-sm am-radius">
<i class="am-icon-cloud-upload"></i> 选择图片</button>
<input type="text" name="images_url" class="am-radius js-choice-one original-images-url" data-choice-one-to=".images-file-event" <notempty name="data"> value="{{$data.images_url}}"{{/if}}" data-validation-message="请选择需要上传的图片" readonly="readonly" <notempty name="data"> value="{{$data.images_url}}"{{/if}} required />
<input type="file" name="file_images_url" multiple data-validation-message="请选择需要上传的图片" 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-images_url-tips" data-image-tag="#form-img-images_url" required />
<div id="form-images_url-tips" class="m-t-5)}}</div>
<div class="am-circle m-t-5 nav-icon-circle" <notempty name="data">style="background-color:{{$data.bg_color}};"{{/if}}>
<img src="{{if !empty($data['images_url'])}}{{$image_host}}{{$data.images_url}}{{else /}}{{$image_host}}/Public/Admin/Default/Images/default-images.png{{/if}}" id="form-img-images_url" width="30" height="30" data-default="{{if !empty($data['images_url'])}}{{$image_host}}{{$data.images_url}}{{else /}}{{$image_host}}/Public/Admin/Default/Images/default-images.png{{/if}}" />
</div>
</div>
<div class="am-form-group">
<label>背景色</label>
<input type="hidden" name="bg_color" value="<notempty name="data">{{$data.bg_color}}{{/if}}" />
<button class="am-btn am-btn-default colorpicker-submit bg-color-tag am-btn-block bk-cr-white t-r" type="button" data-input-tag="button.bg-color-tag" data-color-tag="input[name='bg_color']" data-color-style="background-color" <notempty name="data"> style="background-color:{{$data.bg_color}};"{{/if}}>
<img src="__PUBLIC__/Common/Images/colorpicker.png" />
</button>
</div>
<div class="am-form-group">
<label>顺序</label>
<input type="number" placeholder="顺序" name="sort" min="0" max="255" data-validation-message="顺序 0~255 之间的数值" class="am-radius" value="{{if isset($data['sort'])}}{{$data.sort}}{{else /}}0{{/if}}" required />
</div>
<div class="am-form-group">
<label class="block">是否启用</label>
<input name="is_enable" value="1" type="checkbox" data-off-text="否" data-on-text="是" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="50" data-am-switch {{if !empty($data) and $data['is_enable'] eq 1)}}checked="true"{{/if}} />
</div>
<div class="am-form-group">
<input type="hidden" name="id" <notempty name="data"> value="{{$data.id}}"{{/if}} />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>
</form>
<!-- form end -->
</div>
</div>
<!-- right content end -->
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->