From b9d2d81f5c9e7b03b60998e10b05ad9fa6bd51b4 Mon Sep 17 00:00:00 2001 From: Andrew Thornton Date: Tue, 3 Aug 2021 21:43:22 +0100 Subject: [PATCH] Fix direct creation of external users on admin page From #16612 it was noticed that when creating new external users directly it was not possible to set their username correctly. This PR restores this ability. Signed-off-by: Andrew Thornton --- web_src/js/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web_src/js/index.js b/web_src/js/index.js index 6156429deb6c6..13459357d66e4 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -1984,7 +1984,9 @@ function initAdmin() { $('#password').attr('required', 'required'); } } else { - $('#user_name').attr('disabled', 'disabled'); + if ($('.admin.edit.user').length > 0) { + $('#user_name').attr('disabled', 'disabled'); + } $('#login_name').attr('required', 'required'); $('.non-local').show(); $('.local').hide();