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