2016-04-06 20:34:21 +00:00
<div id='user-edit'>
2016-04-08 13:46:31 +00:00
<form class='tabular'>
2016-04-10 13:55:56 +00:00
<div class='left'>
<div class='input'>
<ul>
2016-05-21 07:45:43 +00:00
<% if (ctx.canEditName) { % >
2016-04-10 13:55:56 +00:00
<li>
2016-05-21 07:45:43 +00:00
<%= ctx.makeTextInput( { text : 'User name' , id : 'user-name' , name : 'name' , value : ctx . user . name , pattern : ctx . userNamePattern } ) %>
2016-04-10 13:55:56 +00:00
</li>
2016-05-09 18:07:54 +00:00
<% } %>
2016-04-07 20:54:45 +00:00
2016-05-21 07:45:43 +00:00
<% if (ctx.canEditPassword) { % >
2016-04-10 13:55:56 +00:00
<li>
2016-05-21 07:45:43 +00:00
<%= ctx.makePasswordInput( { text : 'Password' , id : 'user-password' , name : 'password' , placeholder : 'leave blank if not changing' , pattern : ctx . passwordPattern } ) %>
2016-04-10 13:55:56 +00:00
</li>
2016-05-09 18:07:54 +00:00
<% } %>
2016-04-10 13:55:56 +00:00
2016-05-21 07:45:43 +00:00
<% if (ctx.canEditEmail) { % >
2016-04-10 13:55:56 +00:00
<li>
2016-05-21 07:45:43 +00:00
<%= ctx.makeEmailInput( { text : 'Email' , id : 'user-email' , name : 'email' , value : ctx . user . email } ) %>
2016-04-10 13:55:56 +00:00
</li>
2016-05-09 18:07:54 +00:00
<% } %>
2016-04-07 20:54:45 +00:00
2016-05-21 07:45:43 +00:00
<% if (ctx.canEditRank) { % >
2016-04-10 13:55:56 +00:00
<li>
2016-05-21 07:45:43 +00:00
<%= ctx.makeSelect( { text : 'Rank' , id : 'user-rank' , name : 'rank' , keyValues : ctx . ranks , selectedKey : ctx . user . rank } ) %>
2016-04-10 13:55:56 +00:00
</li>
2016-05-09 18:07:54 +00:00
<% } %>
2016-04-10 13:55:56 +00:00
</ul>
</div>
<div class='messages'></div>
<div class='buttons'>
<input type='submit' value='Save settings'/>
</div>
</div>
2016-05-21 07:45:43 +00:00
<% if (ctx.canEditAvatar) { % >
2016-04-10 13:55:56 +00:00
<div class='right'>
<ul>
2016-04-07 20:54:45 +00:00
<li>
2016-05-21 07:45:43 +00:00
<%= ctx.makeRadio( { text : 'Gravatar' , id : 'gravatar-radio' , name : 'avatar-style' , value : 'gravatar' , selectedValue : ctx . user . avatarStyle } ) %>
2016-04-07 20:54:45 +00:00
</li>
<li>
2016-05-21 07:45:43 +00:00
<%= ctx.makeRadio( { text : 'Manual avatar' , id : 'avatar-radio' , name : 'avatar-style' , value : 'manual' , selectedValue : ctx . user . avatarStyle } ) %>
2016-04-10 13:55:56 +00:00
<div id='avatar-content'></div>
2016-04-07 20:54:45 +00:00
</li>
2016-04-10 13:55:56 +00:00
</ul>
</div>
2016-05-09 18:07:54 +00:00
<% } %>
2016-04-07 20:54:45 +00:00
</form>
2016-04-06 20:34:21 +00:00
</div>