A platform for community discussion. Free, open, simple.
FIX: Do not display enabled inputs when username/name are locked
David Taylor4b0d86d8d339
diff --git a/app/assets/javascripts/discourse/app/controllers/create-account.js b/app/assets/javascripts/discourse/app/controllers/create-account.jsindex f1fd1c66a63..08d19fdb416 100644--- a/app/assets/javascripts/discourse/app/controllers/create-account.js+++ b/app/assets/javascripts/discourse/app/controllers/create-account.js@@ -2,7 +2,7 @@ import getURL from "discourse-common/lib/get-url";import I18n from "I18n";import { A } from "@ember/array";import { isEmpty } from "@ember/utils";-import { notEmpty, and } from "@ember/object/computed";+import { notEmpty } from "@ember/object/computed";import Controller, { inject as controller } from "@ember/controller";import { ajax } from "discourse/lib/ajax";import ModalFunctionality from "discourse/mixins/modal-functionality";@@ -74,8 +74,15 @@ export default Controller.extend(return false;},- usernameDisabled: and("authOptions", "!authOptions.can_edit_username"),- nameDisabled: and("authOptions", "!authOptions.can_edit_name"),+ @discourseComputed("authOptions", "authOptions.can_edit_username")+ usernameDisabled(authOptions, canEditUsername) {+ return authOptions && !canEditUsername;+ },++ @discourseComputed("authOptions", "authOptions.can_edit_name")+ nameDisabled(authOptions, canEditName) {+ return authOptions && !canEditName;+ },@discourseComputedfullnameRequired() {