1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fixes for new user settings

This commit is contained in:
Luke Pulverenti 2013-07-08 15:31:45 -04:00
parent d423d7e446
commit 04142091d9
4 changed files with 15 additions and 5 deletions

View file

@ -17,6 +17,7 @@
<form id="allUserSettingsForm">
<p>Require manual username entry for:</p>
<div data-role="controlgroup">
<input type="checkbox" data-mini="true" id="chkMobileClients" name="chkMobileClients" />
<label for="chkMobileClients">Mobile Clients</label>
@ -25,7 +26,9 @@
<label for="chkMBT">Media Browser Theater</label>
</div>
<div class="fieldDescription">This will be ignored on localhost</div>
<div class="fieldDescription">This will be ignored by the web client on localhost. When disabled clients may present a login screen with a visual selection of users.</div>
<br />
<br />

View file

@ -12,7 +12,7 @@
<h2 style="text-align: left;">Please sign in</h2>
<label for="txtManualName" style="text-align: left;">User:</label>
<input type="text" name="txtManualName" id="txtManualName" />
<input type="text" name="txtManualName" id="txtManualName" required="required" />
<label for="txtManualPassword" style="text-align: left;">Password:</label>
<input type="password" name="txtManualPassword" id="txtManualPassword" placeholder="password" />

View file

@ -59,7 +59,7 @@
if (!loggedInUser.Configuration.IsAdministrator) {
$('#parentalControlDiv', page).hide();
$('#fldIsAdmin', page).hide();
$('#accessControlDiv', page).show();
$('#accessControlDiv', page).hide();
} else {
$('#parentalControlDiv', page).show();
$('#accessControlDiv', page).show();

View file

@ -17,6 +17,7 @@
}).length || !users.length;
// Always display users on localhost, just in case they forgot
showManualForm &= window.location.toString().toLowerCase().indexOf('localhost') == -1;
if (showManualForm) {
@ -69,9 +70,15 @@
ApiClient.authenticateUserByName(username, password).done(function (result) {
Dashboard.setCurrentUser(result.User.Id);
var user = result.User;
window.location = "index.html?u=" + result.User.Id;
Dashboard.setCurrentUser(user.Id);
if (user.Configuration.IsAdministrator) {
window.location = "dashboard.html?u=" + user.Id;
} else {
window.location = "index.html?u=" + user.Id;
}
}).fail(function () {