<%--
  Created by IntelliJ IDEA.
  User: ljx
  Date: 2019/5/13
  Time: 17:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>个人资料</title>
    <%@ include file="/WEB-INF/jspf/common.jspf" %>
</head>
<body>
    <fieldset>
        <legend style="text-align: center;font-weight: bold;font-size: 25px">个人资料</legend>
    </fieldset>
    <form class="form-horizontal" id="form">
        <input name="userId" hidden value="${user.userId}">
        <div class="form-group">
            <label for="userName" class="col-sm-2 control-label">账号</label>
            <div class="col-sm-5">
                <input type="text" id="userName" class="form-control input input-sm" disabled value="${user.userName}">
            </div>
        </div>
        <div class="form-group">
            <label for="name" class="col-sm-2 control-label">姓名</label>
            <div class="col-sm-5">
                <input type="text" class="form-control input input-sm" id="name" name="name"
                       placeholder="请输入姓名" maxlength="16" value="${user.name}">
            </div>
        </div>
        <div class="form-group">
            <label for="userSex" class="col-sm-2 control-label">性别</label>
            <div class="col-sm-5">
                <select class="form-control input-sm" id="userSex" name="userSex">
                    <option value="">不限</option>
                    <option value="0" <c:if test="${user.userSex == 0}">selected</c:if>>男</option>
                    <option value="1" <c:if test="${user.userSex == 1}">selected</c:if>>女</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label for="userAge" class="col-sm-2 control-label">年龄</label>
            <div class="col-sm-5">
                <input type="number" class="form-control input input-sm sexInput" id="userAge" name="userAge" oninput="if(value.length>3)value=value.slice(0,3)" value="${user.userAge}">
            </div>
        </div>
        <div class="form-group">
            <label for="userTel" class="col-sm-2 control-label">移动电话</label>
            <div class="col-sm-5">
                <input type="text" class="form-control input input-sm" id="userTel" name="userTel"
                       oninput="if(value.length>11)value=value.slice(0,11)" placeholder="请输入移动电话" value="${user.userTel}">
            </div>
        </div>
        <div class="form-group">
            <label for="userWechat" class="col-sm-2 control-label">诊疗卡号</label>
            <div class="col-sm-5">
                <input type="text" class="form-control input input-sm" id="userWechat" name="userWechat"
                       placeholder="请输入诊疗卡号" maxlength="50" value="${user.userWechat}">
            </div>
        </div>
        <div class="form-group">
            <label for="userEmail" class="col-sm-2 control-label">邮箱地址</label>
            <div class="col-sm-5">
                <input type="text" class="form-control input input-sm" id="userEmail" name="userEmail"
                       placeholder="请输入邮箱地址" maxlength="50" value="${user.userEmail}">
            </div>
        </div>
        <div class="form-group">
            <label for="userPosition" class="col-sm-2 control-label">职位</label>
            <div class="col-sm-5">
                <input type="text" class="form-control input input-sm" id="userPosition" name="userPosition" placeholder="请输入职位" maxlength="16" value="${user.userPosition}">
            </div>
        </div>
        <div class="form-group">
            <label  class="col-sm-2 control-label">所属科室</label>
            <div class="col-sm-5">
                <input type="text" class="form-control input input-sm" disabled value="${user.powerDepts}">
        </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">所属角色</label>
            <div class="col-sm-5">
                <input type="text" class="form-control input input-sm" disabled value="${user.roleName}">
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="button" class="btn btn-primary" id="btn_submit">提交更改</button>
                <button type="reset" class="btn btn-default">重置</button>
            </div>
        </div>
    </form>
</body>
<script src="${path}/static/js/updatePersonal.js"></script>
</html>
