<div class="panel panel-default">
    <div class="panel-body">
        <br>
        <form class="form-horizontal" method="post" action="/profile/save">
            <div class="form-group">
                <label class="col-sm-2 control-label"><span class="text-danger"> * </span> 用户名 </label>
                <div class="col-sm-4">
                    <input value="{{.user.username}}" type="text" name="name" class="form-control" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label"><span class="text-danger"> * </span> 姓名 </label>
                <div class="col-sm-4">
                    <input value="{{.user.given_name}}" type="text" name="given_name" class="form-control" placeholder="请输入姓名" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label"><span class="text-danger"> * </span> 邮箱 </label>
                <div class="col-sm-4">
                    <input value="{{.user.email}}" type="text" name="email" class="form-control" placeholder="请输入邮箱" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label"><span class="text-danger"> * </span> 手机 </label>
                <div class="col-sm-4">
                    <input value="{{.user.mobile}}" type="text" name="mobile" class="form-control" placeholder="请输入手机号" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label"><span class="text-danger"> * </span> 角色 </label>
                <div class="col-sm-4">
                    {{if eq .user.role "1" }}
                    <input type="text" name="role" class="form-control" value="普通用户" disabled> {{end}} {{if eq .user.role "2" }}
                    <input type="text" name="role" class="form-control" value="管理员" disabled> {{end}} {{if eq .user.role "3" }}
                    <input type="text" name="role" class="form-control" value="超级管理员" disabled> {{end}}
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="button" class="btn btn-primary" onclick="Form.ajaxSubmit(this.form, false)">保存</button>
                </div>
            </div>
        </form>
    </div>
</div>