edit.html 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <include file="public@header"/>
  2. </head>
  3. <body>
  4. <div class="wrap js-check-wrap">
  5. <ul class="nav nav-tabs">
  6. <li><a href="{:url('SlideItem/index',['slide_id'=>$slide_id])}">幻灯片页面列表</a></li>
  7. <li><a href="{:url('SlideItem/add',['slide_id'=>$slide_id])}">添加幻灯片页面</a></li>
  8. <li class="active"><a>编辑幻灯片页面</a></li>
  9. </ul>
  10. <form action="{:url('SlideItem/editPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
  11. <div class="row">
  12. <div class="col-md-9">
  13. <table class="table table-bordered">
  14. <tr>
  15. <th><span class="form-required">*</span>标题</th>
  16. <td>
  17. <input class="form-control" type="text" style="width:400px;" name="post[title]" id="title"
  18. required value="{$result.title}" placeholder="请输入标题"/>
  19. </td>
  20. </tr>
  21. <tr>
  22. <th>链接</th>
  23. <td>
  24. <input class="form-control" type="text" name="post[url]" id="keywords" value="{$result.url}"
  25. style="width: 400px" placeholder="请输入链接">
  26. </td>
  27. </tr>
  28. <tr>
  29. <th>描述</th>
  30. <td><input class="form-control" type="text" name="post[description]" id="source"
  31. value="{$result.description}" style="width: 400px" placeholder="请输入描述"></td>
  32. </tr>
  33. <tr>
  34. <th>幻灯片内容</th>
  35. <td>
  36. <textarea class="form-control" name="post[content]" id="description"
  37. style="width: 47%; height: 100px;"
  38. placeholder="请填写幻灯片内容">{$result.content}</textarea>
  39. </td>
  40. </tr>
  41. </table>
  42. </div>
  43. <div class="col-md-3">
  44. <table class="table table-bordered">
  45. <tr>
  46. <th><b>缩略图</b></th>
  47. </tr>
  48. <tr>
  49. <td>
  50. <div style="text-align: center;">
  51. <input type="hidden" name="post[image]" id="thumb" value="{$result.image|default=''}">
  52. <a href="javascript:uploadOneImage('图片上传','#thumb');">
  53. <if condition="empty($result['image'])">
  54. <img src="__TMPL__/public/assets/images/default-thumbnail.png"
  55. id="thumb-preview" width="135" style="cursor: hand"/>
  56. <else/>
  57. <img src="{:cmf_get_image_preview_url($result['image'])}" id="thumb-preview"
  58. width="135" style="cursor: hand"/>
  59. </if>
  60. </a>
  61. <input type="button" class="btn btn-sm"
  62. onclick="$('#thumb-preview').attr('src','__TMPL__/public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;"
  63. value="取消图片">
  64. </div>
  65. </td>
  66. </tr>
  67. </table>
  68. </div>
  69. </div>
  70. <div class="form-group">
  71. <div class="col-sm-offset-2 col-sm-10">
  72. <input type="hidden" name="post[id]" value="{$result.id}"/>
  73. <input type="hidden" name="post[slide_id]" value="{$slide_id}">
  74. <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
  75. <a class="btn btn-default" href="{:url('SlideItem/index',['slide_id'=>$slide_id])}">{:lang('BACK')}</a>
  76. </div>
  77. </div>
  78. </form>
  79. </div>
  80. <script type="text/javascript" src="__STATIC__/js/admin.js"></script>
  81. </body>
  82. </html>