Changed access rank <select> to radio boxes
This commit is contained in:
parent
4751270228
commit
aa46b4a14b
2 changed files with 17 additions and 15 deletions
|
@ -106,7 +106,7 @@ App.Presenters.UserAccountSettingsPresenter = function(
|
|||
formData.passwordConfirmation = $el.find('[name=passwordConfirmation]').val();
|
||||
}
|
||||
if (privileges.canChangeAccessRank) {
|
||||
formData.accessRank = $el.find('[name=access-rank]').val();
|
||||
formData.accessRank = $el.find('[name=access-rank]:checked').val();
|
||||
}
|
||||
|
||||
if (!validateAccountSettingsFormData(formData)) {
|
||||
|
|
|
@ -71,7 +71,6 @@
|
|||
<div class="form-row">
|
||||
<label class="form-label" for="account-settings-access-rank">Access rank:</label>
|
||||
<div class="form-input">
|
||||
<select name="access-rank" id="account-settings-access-rank">
|
||||
<%
|
||||
var accessRanks = {
|
||||
anonymous: 'Anonymous',
|
||||
|
@ -82,9 +81,12 @@
|
|||
};
|
||||
%>
|
||||
<% _.each(accessRanks, function(v, k) { %>
|
||||
<option <% print(user.accessRank == k ? 'selected="selected"' : '') %> value="<%= k %>"><%= v %></option>
|
||||
<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/>
|
||||
<% }) %>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
|
Loading…
Reference in a new issue