page_form.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. {extend name="../../admin/view/main"}
  2. {block name='content'}
  3. <form action="{:request()->url()}" autocomplete="off" class="layui-form layui-card" data-auto="true" method="post">
  4. <div class="layui-card-body padding-40">
  5. <label class="layui-form-item relative block">
  6. <span class="color-green font-w7">页面名称</span>
  7. <span class="color-desc margin-left-5">Page Name</span>
  8. <input class="layui-input" name="name" placeholder="请输入页面名称" required value='{$data.name|default=""}'>
  9. </label>
  10. <div class="layui-form-item relative block">
  11. <span class="color-green font-w7 label-required-prev">页面名称</span>
  12. <span class="color-desc margin-left-5">Page Content</span>
  13. <label class="relative block">
  14. <textarea class="layui-hide" name="content">{$data.content|default=''}</textarea>
  15. </label>
  16. </div>
  17. <div class="hr-line-dashed"></div>
  18. <div class="layui-form-item text-center">
  19. <button class="layui-btn" type="submit">保存数据</button>
  20. <button class="layui-btn layui-btn-danger" data-confirm="确定要取消编辑吗?" data-history-back type='button'>取消编辑</button>
  21. </div>
  22. </div>
  23. </form>
  24. <script>
  25. layui.form.render();
  26. require(['ckeditor'], function () {
  27. window.createEditor('[name=content]', {height: 500});
  28. });
  29. </script>
  30. {/block}