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

44 lines
1 KiB
JavaScript
Raw Normal View History

2014-10-29 18:01:02 -04:00
(function ($, window, document) {
function loadUser(page, user) {
Dashboard.setPageTitle(user.Name);
if (user.ConnectLinkType == 'Guest') {
$('.connectMessage', page).show();
}
else {
$('.connectMessage', page).hide();
}
2014-10-29 18:01:02 -04:00
Dashboard.hideLoadingMsg();
}
function loadData(page) {
Dashboard.showLoadingMsg();
var userId = getParameterByName("userId");
ApiClient.getUser(userId).done(function (user) {
loadUser(page, user);
});
}
2015-06-07 23:16:42 -04:00
$(document).on('pageinitdepends', "#userPasswordPage", function () {
$('.adminUpdatePasswordForm').off('submit', UpdatePasswordPage.onSubmit).on('submit', UpdatePasswordPage.onSubmit);
$('.adminLocalAccessForm').off('submit', UpdatePasswordPage.onLocalAccessSubmit).on('submit', UpdatePasswordPage.onLocalAccessSubmit);
}).on('pagebeforeshowready', "#userPasswordPage", function () {
2014-10-29 18:01:02 -04:00
var page = this;
loadData(page);
});
})(jQuery, window, document);