szurubooru/public_html/templates/account-settings.tpl

115 lines
3.5 KiB
Smarty
Raw Normal View History

2014-09-07 09:57:01 +02:00
<div class="messages"></div>
2014-09-04 19:07:57 +02:00
2014-09-07 09:57:01 +02:00
<form class="form-wrapper account-settings">
<% if (canChangeAvatarStyle) { %>
<div class="form-row">
<label class="form-label">User picture:</label>
<div class="form-input">
<%
var avatarStyles = {
gravatar: 'Gravatar',
manual: 'Custom',
blank: 'Blank',
};
%>
<% _.each(avatarStyles, function(v, k) { %>
2014-09-17 10:21:20 +02:00
<input <% print(user.avatarStyle == k ? 'checked="checked"' : '') %> type="radio" name="avatar-style" id="account-settings-avatar-<%= k %>" value="<%= k %>"/>
<label for="account-settings-avatar-<%= k %>">
<%= v %>
</label>
<% }) %>
</div>
2014-09-04 19:07:57 +02:00
</div>
<div class="form-row avatar-content">
<label class="form-label"></label>
2014-09-04 19:07:57 +02:00
<div class="form-input">
<input type="file" name="avatar-content" id="account-settings-avatar-content"/>
</div>
2014-09-04 19:07:57 +02:00
</div>
<% } %>
2014-09-04 19:07:57 +02:00
<% if (canChangeName) { %>
<div class="form-row">
<label class="form-label" for="account-settings-name">Name:</label>
<div class="form-input">
<input type="text" name="userName" id="account-settings-name" placeholder="New name&hellip;" value="<%= user.name %>"/>
</div>
2014-09-04 19:07:57 +02:00
</div>
<% } %>
2014-09-04 19:07:57 +02:00
<% if (canChangeEmailAddress) { %>
<div class="form-row">
<label class="form-label" for="account-settings-email">E-mail:</label>
<div class="form-input">
<input type="text" name="email" id="account-settings-email" placeholder="New e-mail&hellip;" value="<%= user.email %>"/>
<% if (user.emailUnconfirmed) { %>
<br/>
<span class="account-settings-email-unconfirmed">(unconfirmed) <%= user.emailUnconfirmed %></span>
<% } %>
</div>
2014-09-04 19:07:57 +02:00
</div>
<% } %>
2014-09-04 19:07:57 +02:00
<% if (canChangePassword) { %>
<div class="form-row">
<label class="form-label" for="account-settings-password">New password:</label>
<div class="form-input">
<input type="password" name="password" id="account-settings-password" placeholder="New password&hellip;" value=""/>
</div>
2014-09-04 19:07:57 +02:00
</div>
<div class="form-row">
<label class="form-label" for="account-settings-password-confirmation"></label>
<div class="form-input">
<input type="password" name="passwordConfirmation" id="account-settings-password-confirmation" placeholder="New password&hellip; (repeat)" value=""/>
</div>
2014-09-04 19:07:57 +02:00
</div>
<% } %>
2014-09-30 13:22:11 +02:00
<% if (canBan) { %>
<div class="form-row">
<label class="form-label" for="account-settings-ban">Ban:</label>
<div class="form-input">
<input name="ban" type="checkbox" id="ban" <% print(user.banned ? 'checked="checked"' : '') %>>
<label for="ban">
Enabled
</label>
</div>
</div>
<% } %>
<% if (canChangeAccessRank) { %>
<div class="form-row">
<label class="form-label" for="account-settings-access-rank">Access rank:</label>
<div class="form-input">
<%
var accessRanks = {
anonymous: 'Anonymous',
restrictedUser: 'Restricted user',
regularUser: 'Regular user',
powerUser: 'Power user',
moderator: 'Moderator',
administrator: 'Administrator'
};
%>
<% _.each(accessRanks, function(v, k) { %>
<input name="access-rank" type="radio" value="<%= k %>" id="access-rank-<%= k %>" <% print(user.accessRank == k ? 'checked="checked"' : '') %>>
<label for="access-rank-<%= k %>">
<% print(user.accessRank == k ? v + ' (current)' : v) %>
</label>
<br/>
<% }) %>
</div>
</div>
<% } %>
2014-09-04 19:07:57 +02:00
<div class="form-row">
<label class="form-label"></label>
<div class="form-input">
<button type="submit">Update settings</button>
2014-09-04 19:07:57 +02:00
</div>
</div>
</form>