form.html 2.0 KB

123456789101112131415161718192021222324252627282930313233343536
  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-row margin-bottom-15">
  4. <label class="layui-col-xs2 think-form-label">用户名</label>
  5. <label class="layui-col-xs10">
  6. {notempty name='vo.id'} <input name="name" required value='{$vo.name|default=""}' style="background-color: #e6e6e6" readonly class="layui-input">{/notempty}
  7. {empty name='vo.id'} <input name="name" required value='{$vo.name|default=""}' placeholder="请输入用户名" class="layui-input">{/empty}
  8. </label>
  9. </div>
  10. <div class="layui-row margin-bottom-15">
  11. <label class="layui-col-xs2 think-form-label">登录手机号</label>
  12. <label class="layui-col-xs10">
  13. {notempty name='vo.id'} <input name="phone" required value='{$vo.phone|default=""}' style="background-color: #e6e6e6" readonly class="layui-input">{/notempty}
  14. {empty name='vo.id'} <input name="phone" required value='{$vo.phone|default=""}' placeholder="请输入登录手机号" class="layui-input">{/empty}
  15. </label>
  16. </div>
  17. <div class="layui-row margin-bottom-15">
  18. <label class="layui-col-xs2 think-form-label">登录密码</label>
  19. <label class="layui-col-xs10">
  20. <input name="password" required value='{$vo.password|default=""}' placeholder="请输入登录密码" class="layui-input">
  21. </label>
  22. </div>
  23. </div>
  24. <div class="hr-line-dashed"></div>
  25. <div class="layui-form-item text-center">
  26. {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
  27. <button class="layui-btn" type='submit'>保存数据</button>
  28. <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
  29. </div>
  30. </form>