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

addressed suggested changes in pull request.

This commit is contained in:
Justin Suess 2019-01-29 05:57:03 -06:00
parent a62d70fc78
commit 52010486b9
2 changed files with 13 additions and 10 deletions

View file

@ -27,8 +27,7 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em
type: "POST", type: "POST",
data: { data: {
Name: form.querySelector("#txtUsername").value, Name: form.querySelector("#txtUsername").value,
Password: form.querySelector("#txtManualPassword").value Password: form.querySelector("#txtManualPassword").value
}, },
url: apiClient.getUrl("Startup/User"), url: apiClient.getUrl("Startup/User"),
dataType: "json" dataType: "json"
@ -38,12 +37,16 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em
} }
function onSubmit(e) { function onSubmit(e) {
var form = this; var form = this;
return form.querySelector("#txtManualPassword").value != form.querySelector("#txtPasswordConfirm").value ? require(["toast"], function(toast) { if (form.querySelector("#txtManualPassword").value != form.querySelector("#txtPasswordConfirm").value) {
toast(Globalize.translate("PasswordMatchError")) require(["toast"], function(toast) {
}) : submit(this), e.preventDefault(), !1 toast(Globalize.translate("PasswordMatchError"));
});
} else {
submit(form);
}
e.preventDefault();
return false;
} }
function onViewShow() { function onViewShow() {
@ -51,8 +54,9 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em
var page = this, var page = this,
apiClient = getApiClient(); apiClient = getApiClient();
apiClient.getJSON(apiClient.getUrl("Startup/User")).then(function(user) { apiClient.getJSON(apiClient.getUrl("Startup/User")).then(function(user) {
page.querySelector("#txtUsername").value = user.Name || "", loading.hide() page.querySelector("#txtUsername").value = user.Name || "",
page.querySelector("#txtManualPassword").value = user.Password || "", loading.hide() page.querySelector("#txtManualPassword").value = user.Password || "",
loading.hide()
}) })
} }
return function(view, params) { return function(view, params) {

View file

@ -82,7 +82,6 @@
"LabelUrl": "URL:", "LabelUrl": "URL:",
"LabelZipCode": "Post Code:", "LabelZipCode": "Post Code:",
"LabelffmpegPathHelp": "The path to the ffmpeg application file or folder containing ffmpeg.", "LabelffmpegPathHelp": "The path to the ffmpeg application file or folder containing ffmpeg.",
"LeaveBlankToNotSetAPassword": "Optional - leave blank to set no password",
"LinkApi": "API", "LinkApi": "API",
"MessageConfirmRevokeApiKey": "Are you sure you wish to revoke this API key? The application's connection to Jellyfin Server will be abruptly terminated.", "MessageConfirmRevokeApiKey": "Are you sure you wish to revoke this API key? The application's connection to Jellyfin Server will be abruptly terminated.",
"MessageForgotPasswordFileExpiration": "The reset PIN will expire at {0}.", "MessageForgotPasswordFileExpiration": "The reset PIN will expire at {0}.",