Add block unrated option

This commit is contained in:
Eric Reed 2013-05-23 11:07:25 -04:00
parent f96d8373f1
commit b9d5dea662
2 changed files with 7 additions and 3 deletions

View File

@ -20,10 +20,14 @@
<label for="txtUserName">Name: </label>
<input id="txtUserName" name="txtUserName" required="required" type="text" />
</li>
<li id="fldMaxParentalRating" style="display: none;">
<li id="fldMaxParentalRating" >
<label for="selectMaxParentalRating">Max parental rating:</label>
<select name="selectMaxParentalRating" id="selectMaxParentalRating"></select>
</li>
<li id="fldBlockNotRated" >
<input type="checkbox" id="chkBlockNotRated" name="chkBlockNotRated" />
<label for="chkBlockNotRated">Block items with no rating information</label>
</li>
<li id="fldIsAdmin" style="display: none;">
<input type="checkbox" id="chkIsAdmin" name="chkIsAdmin" />
<label for="chkIsAdmin">Allow this user to manage the server</label>

View File

@ -59,10 +59,8 @@
if (!loggedInUser.Configuration.IsAdministrator) {
$('#fldIsAdmin', page).hide();
$('#fldMaxParentalRating', page).hide();
} else {
$('#fldIsAdmin', page).show();
$('#fldMaxParentalRating', page).show();
}
Dashboard.setPageTitle(user.Name || "Add User");
@ -101,6 +99,7 @@
$('#chkForcedSubtitlesOnly', page).checked(user.Configuration.UseForcedSubtitlesOnly || false).checkboxradio("refresh");
$('#chkIsAdmin', page).checked(user.Configuration.IsAdministrator || false).checkboxradio("refresh");
$('#chkBlockNotRated', page).checked(user.Configuration.BlockNotRated || false).checkboxradio("refresh");
Dashboard.hideLoadingMsg();
}
@ -130,6 +129,7 @@
user.Configuration.AudioLanguagePreference = $('#selectAudioLanguage', page).val();
user.Configuration.SubtitleLanguagePreference = $('#selectSubtitleLanguage', page).val();
user.Configuration.UseForcedSubtitlesOnly = $('#chkForcedSubtitlesOnly', page).checked();
user.Configuration.BlockNotRated = $('#chkBlockNotRated', page).checked();
var userId = getParameterByName("userId");