|
|
@ -2,43 +2,47 @@ |
|
|
|
<% include header %> |
|
|
|
<% include header %> |
|
|
|
<div class="padding"> |
|
|
|
<div class="padding"> |
|
|
|
<div class="ui <% if (error_info == 'Success') { %>success<% } else { %>error<% } %> message" id="error" <% if (!error_info) { %>hidden<% } %>> |
|
|
|
<div class="ui <% if (error_info == 'Success') { %>success<% } else { %>error<% } %> message" id="error" <% if (!error_info) { %>hidden<% } %>> |
|
|
|
<% if (error_info) { |
|
|
|
<% if (error_info) { |
|
|
|
if (error_info == 'Success') error_info = '修改成功'; |
|
|
|
if (error_info == 'Success') error_info = '修改成功'; |
|
|
|
%> |
|
|
|
%> |
|
|
|
<p id="error_info"><%= error_info %></p> |
|
|
|
<p id="error_info"><%= error_info %></p> |
|
|
|
<% } %> |
|
|
|
<% } %> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<form class="ui form" action="<%= syzoj.utils.makeUrl(['user', edited_user.id, 'edit']) %>" method="post" onsubmit="return check()"> |
|
|
|
<form class="ui form" action="<%= syzoj.utils.makeUrl(['user', edited_user.id, 'edit']) %>" method="post" onsubmit="return check()"> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="sex">性别</label> |
|
|
|
<label for="username">用户名</label> |
|
|
|
<select class="ui dropdown" name="sex"> |
|
|
|
<input type="text" id="username" name="username" value="<%= edited_user.username %>"<% if (!user.is_admin) { %> readonly<% } %>> |
|
|
|
<option value="0" <%= edited_user.sex == 0 ? 'selected': '' %>>其它</option> |
|
|
|
</div> |
|
|
|
<option value="1" <%= edited_user.sex == 1 ? 'selected': '' %>>男</option> |
|
|
|
<div class="field"> |
|
|
|
<option value="-1" <%= edited_user.sex == -1 ? 'selected': '' %>>女</option> |
|
|
|
<label for="sex">性别</label> |
|
|
|
</select> |
|
|
|
<select class="ui dropdown" name="sex"> |
|
|
|
</div> |
|
|
|
<option value="0" <%= edited_user.sex == 0 ? 'selected': '' %>>其它</option> |
|
|
|
<div class="field"> |
|
|
|
<option value="1" <%= edited_user.sex == 1 ? 'selected': '' %>>男</option> |
|
|
|
<label for="email">Email</label> |
|
|
|
<option value="-1" <%= edited_user.sex == -1 ? 'selected': '' %>>女</option> |
|
|
|
<input type="email" id="email" name="email" value="<%= edited_user.email %>"> |
|
|
|
</select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label for="information">个性签名</label> |
|
|
|
<label for="email">Email</label> |
|
|
|
<textarea rows="5" id="information" name="information"><%= edited_user.information %></textarea> |
|
|
|
<input type="email" id="email" name="email" value="<%= edited_user.email %>"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="field"> |
|
|
|
|
|
|
|
<label for="information">个性签名</label> |
|
|
|
|
|
|
|
<textarea rows="5" id="information" name="information"><%= edited_user.information %></textarea> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="field"> |
|
|
|
|
|
|
|
<label class="ui header">修改密码</label> |
|
|
|
|
|
|
|
<input type="password" placeholder="原密码(留空则不修改)" name="old_password" id="old_password"> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="two fields" id="new_password_field"> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<label class="ui header">修改密码</label> |
|
|
|
<input type="password" placeholder="新密码" name="new_password" id="password1"> |
|
|
|
<input type="password" placeholder="原密码(留空则不修改)" name="old_password" id="old_password"> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="two fields" id="new_password_field"> |
|
|
|
<div class="field"> |
|
|
|
<div class="field"> |
|
|
|
<input type="password" placeholder="确认密码" id="password2"> |
|
|
|
<input type="password" placeholder="新密码" name="new_password" id="password1"> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="field"> |
|
|
|
|
|
|
|
<input type="password" placeholder="确认密码" id="password2"> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<button type="submit" class="ui button">修改</button> |
|
|
|
</div> |
|
|
|
<a href="<%= syzoj.utils.makeUrl(['user', edited_user.id]) %>" class="ui blue button">返回个人资料</a> |
|
|
|
<button type="submit" class="ui button">修改</button> |
|
|
|
|
|
|
|
<a href="<%= syzoj.utils.makeUrl(['user', edited_user.id]) %>" class="ui blue button">返回个人资料</a> |
|
|
|
</form> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|