diff --git a/src/scripts/wizarduserpage.js b/src/scripts/wizarduserpage.js index dac1abf913..97b3dd6155 100644 --- a/src/scripts/wizarduserpage.js +++ b/src/scripts/wizarduserpage.js @@ -27,8 +27,7 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em type: "POST", data: { Name: form.querySelector("#txtUsername").value, - Password: form.querySelector("#txtManualPassword").value - + Password: form.querySelector("#txtManualPassword").value }, url: apiClient.getUrl("Startup/User"), dataType: "json" @@ -38,12 +37,16 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em } function onSubmit(e) { - var form = this; - return form.querySelector("#txtManualPassword").value != form.querySelector("#txtPasswordConfirm").value ? require(["toast"], function(toast) { - toast(Globalize.translate("PasswordMatchError")) - }) : submit(this), e.preventDefault(), !1 - + if (form.querySelector("#txtManualPassword").value != form.querySelector("#txtPasswordConfirm").value) { + require(["toast"], function(toast) { + toast(Globalize.translate("PasswordMatchError")); + }); + } else { + submit(form); + } + e.preventDefault(); + return false; } function onViewShow() { @@ -51,8 +54,9 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em var page = this, apiClient = getApiClient(); apiClient.getJSON(apiClient.getUrl("Startup/User")).then(function(user) { - page.querySelector("#txtUsername").value = user.Name || "", loading.hide() - page.querySelector("#txtManualPassword").value = user.Password || "", loading.hide() + page.querySelector("#txtUsername").value = user.Name || "", + page.querySelector("#txtManualPassword").value = user.Password || "", + loading.hide() }) } return function(view, params) { diff --git a/src/strings/en-GB.json b/src/strings/en-GB.json index 4b6068f5c0..ac8a0354d6 100644 --- a/src/strings/en-GB.json +++ b/src/strings/en-GB.json @@ -82,7 +82,6 @@ "LabelUrl": "URL:", "LabelZipCode": "Post Code:", "LabelffmpegPathHelp": "The path to the ffmpeg application file or folder containing ffmpeg.", - "LeaveBlankToNotSetAPassword": "Optional - leave blank to set no password", "LinkApi": "API", "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}.",