123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <style>
- .upload-image {
- background: url('__CDN__/assets/addons/example/img/plus.png') no-repeat center center;
- background-size: 30px 30px;
- height: 30px;
- width: 30px;
- border: 1px solid #ccc;
- }
- </style>
- <div class="row">
- <!--内容-->
- <div class="col-md-6">
- <div class="box box-success">
- <div class="panel-body">
- <form id="aaa-form" role="form" data-toggle="validator" method="POST" action="">
- <div class="form-group row">
- <label class="control-label col-xs-12">版本照</label>
- <div class="col-xs-12">
- <div class="input-group">
- <input data-rule="required" class="form-control" name="row[name]" type="hidden" value="{$iantern_slide->name}">
- <input id="a-files" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="{$iantern_slide->image}">
- <div class="input-group-addon no-border no-padding">
- <span><button type="button" id="plupload-files" class="btn btn-danger plupload" data-input-id="a-files" data-mimetype="*" data-multiple="true" data-preview-id="aa-files"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
- <span><button type="button" id="fachoose-files" class="btn btn-primary fachoose" data-input-id="a-files" data-mimetype="*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
- </div>
- <span class="msg-box n-right" for="a-files"></span>
- </div>
- <!--ul需要添加 data-template和data-name属性,并一一对应且唯一 -->
- <ul class="row list-inline plupload-preview" id="aa-files" data-template="introtpl" data-name="row[image]"></ul>
- <!--请注意 ul和textarea间不能存在其它任何元素,实际开发中textarea应该添加个hidden进行隐藏-->
- <!--这里自定义图片预览的模板 开始-->
- <script type="text/html" id="introtpl">
- <li class="col-xs-3">
- <a href="<%=fullurl%>" data-url="<%=url%>" target="_blank" class="thumbnail">
- <img src="<%=fullurl%>" class="img-responsive">
- </a>
- <a href="javascript:;" class="btn btn-danger btn-xs btn-trash"><i class="fa fa-trash"></i></a>
- </li>
- </script>
- <!--这里自定义图片预览的模板 结束-->
- </div>
- </div>
- <div class="form-group row">
- <label class="control-label col-xs-12"></label>
- <div class="col-xs-12">
- <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
- <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
|