修改后台用户编辑表单

This commit is contained in:
Anyon 2020-04-16 22:13:07 +08:00
parent 72d3aa7880
commit 94059c0739

View File

@ -1,65 +1,63 @@
<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
<div class="layui-card-body padding-left-40">
<fieldset class="layui-form-item">
<legend class="layui-bg-gray">账号信息</legend>
<div class="layui-row layui-col-space15">
<div class="layui-col-xs2" style="width:100px">
<input type="hidden" name="headimg" value="{$vo.headimg|default=''}">
<script>$('[name=headimg]').uploadOneImage()</script>
</div>
<div class="layui-col-xs5">
<label class="block relative">
<span class="color-green font-w7">登录账号</span>
<span class="color-desc margin-left-5">Username</span>
{if isset($vo) and isset($vo.username)}
<input disabled value='{$vo.username|default=""}' class="layui-input layui-bg-gray">
{else}
<input name="username" value='{$vo.username|default=""}' required pattern="^.{4,}$" placeholder="请输入登录用户账号" class="layui-input">
{/if}
<span class="help-block">登录账号不能重复,账号创建后不能再次修改</span>
</label>
</div>
<div class="layui-col-xs5">
<label class="block relative">
<span class="color-green font-w7">用户昵称</span>
<span class="color-desc margin-left-5">Nickname</span>
<input name="nickname" value='{$vo.nickname|default=""}' required placeholder="请输入用户的昵称" class="layui-input">
<span class="help-block">用户显示的账号别名,请尽量保持不要重复</span>
</label>
</div>
<div class="layui-row layui-col-space15">
<div class="layui-col-xs2 text-center">
<input type="hidden" name="headimg" value="{$vo.headimg|default=''}">
<script>$('[name=headimg]').uploadOneImage()</script>
</div>
</fieldset>
<fieldset class="layui-form-item">
<legend class="layui-bg-gray">用户资料</legend>
<div class="layui-row layui-col-space15">
<div class="layui-col-xs4">
<label class="relative block">
<span class="color-green font-w7">联系邮箱</span>
<span class="color-desc margin-left-5">Email</span>
<input name="contact_mail" autocomplete="off" pattern="^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$" value='{$vo.contact_mail|default=""}' placeholder="请输入联系电子邮箱" class="layui-input">
<span class="color-desc">可选,请填写常用的电子邮箱</span>
</label>
</div>
<div class="layui-col-xs4">
<label class="relative block">
<span class="color-green font-w7">联系手机</span>
<span class="color-desc margin-left-5">Mobile</span>
<input type="tel" maxlength="11" autocomplete="off" name="contact_phone" value='{$vo.contact_phone|default=""}' pattern="^1[3-9][0-9]{9}$" placeholder="请输入用户联系手机" class="layui-input">
<span class="color-desc">可选,请填写常用的联系手机号</span>
</label>
</div>
<div class="layui-col-xs4">
<label class="relative block">
<span class="color-green font-w7">联系QQ</span>
<span class="color-desc margin-left-5">TencentQQ</span>
<input name="contact_qq" autocomplete="off" pattern="^\d{6,}$" value='{$vo.contact_qq|default=""}' placeholder="请输入联系QQ" class="layui-input">
<span class="color-desc">可选,请填写常用的联系QQ号</span>
</label>
</div>
<div class="layui-col-xs5">
<label class="block relative">
<span class="color-green font-w7">登录账号</span>
<span class="color-desc margin-left-5">Username</span>
{if isset($vo) and isset($vo.username)}
<input disabled value='{$vo.username|default=""}' class="layui-input layui-bg-gray">
{else}
<input name="username" value='{$vo.username|default=""}' required pattern="^.{4,}$" placeholder="请输入登录用户账号" class="layui-input">
{/if}
<span class="help-block">登录账号不能重复,账号创建后不能再次修改</span>
</label>
</div>
</fieldset>
<div class="layui-col-xs5">
<label class="block relative">
<span class="color-green font-w7">用户昵称</span>
<span class="color-desc margin-left-5">Nickname</span>
<input name="nickname" value='{$vo.nickname|default=""}' required placeholder="请输入用户的昵称" class="layui-input">
<span class="help-block">用户显示的账号别名,请尽量保持不要重复</span>
</label>
</div>
</div>
<div class="layui-row layui-col-space15">
<div class="layui-col-xs4">
<label class="relative block">
<span class="color-green font-w7">联系邮箱</span>
<span class="color-desc margin-left-5">Email</span>
<input name="contact_mail" autocomplete="off" pattern="^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$" value='{$vo.contact_mail|default=""}' placeholder="请输入联系电子邮箱" class="layui-input">
<span class="color-desc">可选,请填写常用的电子邮箱</span>
</label>
</div>
<div class="layui-col-xs4">
<label class="relative block">
<span class="color-green font-w7">联系手机</span>
<span class="color-desc margin-left-5">Mobile</span>
<input type="tel" maxlength="11" autocomplete="off" name="contact_phone" value='{$vo.contact_phone|default=""}' pattern="^1[3-9][0-9]{9}$" placeholder="请输入用户联系手机" class="layui-input">
<span class="color-desc">可选,请填写常用的联系手机号</span>
</label>
</div>
<div class="layui-col-xs4">
<label class="relative block">
<span class="color-green font-w7">联系QQ</span>
<span class="color-desc margin-left-5">TencentQQ</span>
<input name="contact_qq" autocomplete="off" pattern="^\d{6,}$" value='{$vo.contact_qq|default=""}' placeholder="请输入联系QQ" class="layui-input">
<span class="color-desc">可选,请填写常用的联系QQ号</span>
</label>
</div>
</div>
{notempty name='authorizes'}
<div class="layui-form-item layui-col-space10">
<div class="layui-form-item">
<span class="color-green font-w7">访问权限</span>
<span class="color-desc margin-left-5">Authorize</span>
<div class="layui-textarea">
@ -81,9 +79,8 @@
</div>
</div>
{/notempty}
<label class="layui-form-item layui-col-space10 block">
<span class="color-green font-w7">用户描述</span>
<span class="color-desc margin-left-5">Description</span>
<label class="layui-form-item block relative">
<span class="color-green font-w7">用户描述</span><span class="color-desc">Description</span>
<textarea placeholder="请输入用户描述" class="layui-textarea" name="describe">{$vo.describe|default=""}</textarea>
</label>
<div class="hr-line-dashed"></div>