| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- <include file="public@header"/>
- <style type="text/css">
- .pic-list li {
- margin-bottom: 5px;
- }
-
- </style>
- <script type="text/html" id="photos-item-tpl">
- <li id="saved-image{id}">
- <input id="photo-{id}" type="hidden" name="img[]" value="{filepath}">
- <input class="form-control" id="photo-{id}-name" type="text" name="photo_names[]" value="{name}"
- style="width: 200px;" title="图片名称">
- <img id="photo-{id}-preview" src="{url}" style="height:36px;width: 36px;"
- onclick="imagePreviewDialog(this.src);">
- <a href="javascript:uploadOneImage('图片上传','#photo-{id}');">替换</a>
- <a href="javascript:(function(){$('#saved-image{id}').remove();})();">移除</a>
- </li>
- </script>
- </head>
- <body>
- <div class="wrap js-check-wrap">
- <ul class="nav nav-tabs">
- <li><a href="{:url('reply/index')}">回复二维码列表</a></li>
- <li><a href="{:url('reply/add')}">添加回复二维码</a></li>
- <li class="active"><a href="#">编辑回复二维码</a></li>
- </ul>
- <form action="{:url('Reply/editPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
- <div class="row">
- <div class="col-md-9">
- <table class="table table-bordered">
-
- <tr>
- <th style="width:130px;">回复二维码标题<span class="form-required">*</span></th>
- <td>
- <input class="form-control" type="text" name="title"
- id="title" required value="{$reply.title}" placeholder="请输入标题"/>
- </td>
- </tr>
- <tr>
- <th style="width:120px;">回复关键字<span class="form-required">*</span></th>
- <td>
- <input class="form-control" style="width:500px;float: left; margin-right: 20px;" type="text" name="keyword"
- id="keyword" required value="{$reply.keyword}" placeholder="请输入回复关键字"/>
- <button type="button" style="float: left;" id="butpro" class="btn btn-primary js-ajax-submit">生成四位数字</button>
- </td>
- </tr>
- <tr>
- <th style="width:120px;">二维码图片</th>
- <td>
- <ul id="img" class="pic-list list-unstyled form-inline">
- <notempty name="reply.img">
- <foreach name="reply.img" item="vo">
-
- <li id="saved-image{$key}">
- <input id="photo-{$key}" type="hidden" name="img[]"
- value="{$vo}">
- <!-- <input class="form-control" id="photo-{$key}-name" type="text"
- name="photo_names[]"
- value="{$vo|default=''}" style="width: 200px;" title="图片名称"> -->
- <img id="photo-{$key}-preview"
- src="{:cmf_get_image_preview_url($vo)}"
- style="height:36px;width: 36px;"
- onclick="parent.imagePreviewDialog(this.src);">
- <a href="javascript:uploadOneImage('图片上传','#photo-{$key}');">替换</a>
- <a href="javascript:(function(){$('#saved-image{$key}').remove();})();">移除</a>
- </li>
- </foreach>
- </notempty>
- </ul>
- <a href="javascript:uploadMultiImage('图片上传','#img','photos-item-tpl');"
- class="btn btn-default btn-sm">选择图片</a>
- </td>
- </tr>
-
- <tr>
- <th style="width:120px;">回复文字</th>
- <td>
- <textarea class="form-control" name="content" style="height: 80px;"
- placeholder="请填写回复文字">{$reply.content}</textarea>
- </td>
- </tr>
-
- </table>
- <hook name="portal_admin_article_edit_view_main"/>
- <div class="form-group">
- <div class="col-sm-offset-2 col-sm-10">
- <input type="hidden" name="id" value="{$reply.id}">
- <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
- <a class="btn btn-default" href="{:url('Reply/index')}">{:lang('BACK')}</a>
- </div>
- </div>
- </div>
-
- </div>
- </form>
- </div>
- <script type="text/javascript" src="__STATIC__/js/admin.js"></script>
- <script type="text/javascript">
- function rand(min,max) {
- return Math.floor(Math.random()*(max-min))+min;
- }
- $("#butpro").click(function(){
- var randnum=rand(1000,9999);
- $('#keyword').val(randnum);
- });
- </script>
- </body>
- </html>
|