This commit is contained in:
Luke Pulverenti 2013-05-23 11:40:35 -04:00
commit c83efd85a9
2 changed files with 7 additions and 3 deletions

View File

@ -20,10 +20,14 @@
<label for="txtUserName">Name: </label> <label for="txtUserName">Name: </label>
<input id="txtUserName" name="txtUserName" required="required" type="text" /> <input id="txtUserName" name="txtUserName" required="required" type="text" />
</li> </li>
<li id="fldMaxParentalRating" style="display: none;"> <li id="fldMaxParentalRating" >
<label for="selectMaxParentalRating">Max parental rating:</label> <label for="selectMaxParentalRating">Max parental rating:</label>
<select name="selectMaxParentalRating" id="selectMaxParentalRating"></select> <select name="selectMaxParentalRating" id="selectMaxParentalRating"></select>
</li> </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;"> <li id="fldIsAdmin" style="display: none;">
<input type="checkbox" id="chkIsAdmin" name="chkIsAdmin" /> <input type="checkbox" id="chkIsAdmin" name="chkIsAdmin" />
<label for="chkIsAdmin">Allow this user to manage the server</label> <label for="chkIsAdmin">Allow this user to manage the server</label>

View File

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