66 lines
4.2 KiB
HTML
Executable File
66 lines
4.2 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/Slide/Save')}}" method="POST" request-type="ajax-url" request-value="{{:url('Admin/Slide/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/Slide/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>
|
|
<input type="text" name="jump_url" placeholder="跳转地址" data-validation-message="跳转地址最多 255 个字符" class="am-radius" <notempty name="data"> value="{{$data.jump_url}}"{{/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>
|
|
<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" class="block m-t-5 am-img-thumbnail am-radius" width="300" height="150" 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 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 --> |