ad_form.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {extend name="../../admin/view/main"}
  2. {block name='content'}
  3. <form action="{:sysuri()}" class="layui-card layui-form" data-auto="true" method="post">
  4. <div class="layui-card-body">
  5. <div class="layui-form-item">
  6. <span class="help-label"><b>封面</b>News Conver</span>
  7. <div class="relative block label-required-null">
  8. <input class="layui-input think-bg-gray" name="images" placeholder="请上传封面" readonly value='{$vo.images|default=""}'>
  9. <a class="layui-icon layui-icon-upload input-right-icon" data-file data-field="cover" data-type="gif,png,jpg,jpeg"></a>
  10. </div>
  11. </div>
  12. <label class="layui-form-item relative block">
  13. <span class="help-label"><b>标题</b>News Title</span>
  14. <input class="layui-input" name="title" placeholder="请输入标题" required value='{$vo.title|default=""}'>
  15. </label>
  16. <label class="layui-form-item relative block">
  17. <span class="help-label"><b>来源</b></span>
  18. <input class="layui-input" name="source" placeholder="请输入标题" required value='{$vo.source|default=""}'>
  19. </label>
  20. <label class="layui-form-item relative block">
  21. <span class="help-label"><b>排序</b>News Title</span>
  22. <input class="layui-input" type="number" name="sort" placeholder="排序" required value='{$vo.sort|default="0"}'>
  23. </label>
  24. <div class="layui-form-item layui-row layui-col-space15">
  25. <label class="layui-col-xs12 relative">
  26. <span class="color-green font-w7">详情</span>
  27. <textarea placeholder="广告详情" required class="layui-textarea" name="content">{$vo.content|default=""}</textarea>
  28. </label>
  29. </div>
  30. <div class="hr-line-dashed"></div>
  31. {notempty name='vo.id'}<input name='id' type='hidden' value='{$vo.id}'>{/notempty}
  32. <div class="layui-form-item text-center">
  33. <button class="layui-btn" type="submit">保存数据</button>
  34. <button class="layui-btn layui-btn-danger" data-history-back data-confirm="确定要取消编辑吗?" data-close type='button'>取消编辑</button>
  35. </div>
  36. </div>
  37. </form>
  38. <script>
  39. $('input[name="images"]').uploadOneImage();
  40. window.form.render();
  41. require(['ckeditor', 'angular'], function () {
  42. window.createEditor('[name="content"]', {
  43. });
  44. })
  45. </script>
  46. {/block}