form.html 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. <form onsubmit="return false;" action="{:request()->url()}" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
  2. <div class="layui-card-body">
  3. <div class="layui-form-item">
  4. <label class="layui-col-xs2 think-form-label">名称</label>
  5. <label class="layui-col-xs10">
  6. <input name="title" required value='{$vo.title|default=""}' placeholder="请输入名称" class="layui-input">
  7. </label>
  8. </div>
  9. <div class="layui-row margin-bottom-15">
  10. <label class="layui-col-xs2 think-form-label">模板</label>
  11. <label class="layui-col-xs8 think-form-group-left">
  12. <input name="url" required readonly value='{$vo.url|default=""}' placeholder="请上传模板" class="layui-input">
  13. </label>
  14. <a class="layui-col-xs2 layui-btn think-form-group-right" data-file="btn" data-field="url" data-type="xls,xlsx">
  15. <i class="layui-icon layui-icon-upload"></i> 上传模板
  16. </a>
  17. </div>
  18. </div>
  19. <div class="hr-line-dashed"></div>
  20. <div class="layui-form-item text-center">
  21. {if isset($vo.id)}<input type='hidden' value="<?php echo date('Y-m-d H:i:s'); ?>" name='update_at'>{else}<input type='hidden' value="<?php echo date('Y-m-d H:i:s'); ?>" name='create_at'>{/if}
  22. {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
  23. <button class="layui-btn" type='submit'>保存数据</button>
  24. </div>
  25. </form>
  26. <script>window.form.render();
  27. </script>