mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
move authentication and playback controllers to subdirectories
This commit is contained in:
parent
4bf12b1682
commit
07994e0a40
13 changed files with 12 additions and 12 deletions
41
src/controllers/auth/forgotpasswordpin.js
Normal file
41
src/controllers/auth/forgotpasswordpin.js
Normal file
|
@ -0,0 +1,41 @@
|
|||
define([], function () {
|
||||
"use strict";
|
||||
|
||||
function processForgotPasswordResult(result) {
|
||||
if (result.Success) {
|
||||
var msg = Globalize.translate("MessagePasswordResetForUsers");
|
||||
msg += "<br/>";
|
||||
msg += "<br/>";
|
||||
msg += result.UsersReset.join("<br/>");
|
||||
return void Dashboard.alert({
|
||||
message: msg,
|
||||
title: Globalize.translate("HeaderPasswordReset"),
|
||||
callback: function () {
|
||||
window.location.href = "index.html";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Dashboard.alert({
|
||||
message: Globalize.translate("MessageInvalidForgotPasswordPin"),
|
||||
title: Globalize.translate("HeaderPasswordReset")
|
||||
});
|
||||
}
|
||||
|
||||
return function (view, params) {
|
||||
function onSubmit(e) {
|
||||
ApiClient.ajax({
|
||||
type: "POST",
|
||||
url: ApiClient.getUrl("Users/ForgotPassword/Pin"),
|
||||
dataType: "json",
|
||||
data: {
|
||||
Pin: view.querySelector("#txtPin").value
|
||||
}
|
||||
}).then(processForgotPasswordResult);
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
|
||||
view.querySelector("form").addEventListener("submit", onSubmit);
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue