From 6b3b6f1833d07383d24d68ec220a18315ac36809 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sun, 10 Jan 2021 13:14:02 +0100 Subject: Add option to change username to the admin panel (#14229) Co-authored-by: Bwko Co-authored-by: techknowlogick Co-authored-by: zeripath --- web_src/js/index.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'web_src') diff --git a/web_src/js/index.js b/web_src/js/index.js index 37c31538af..07d5b99e31 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -1796,6 +1796,7 @@ function initAdmin() { if ($('.admin.new.user').length > 0 || $('.admin.edit.user').length > 0) { $('#login_type').on('change', function () { if ($(this).val().substring(0, 1) === '0') { + $('#user_name').removeAttr('disabled'); $('#login_name').removeAttr('required'); $('.non-local').hide(); $('.local').show(); @@ -1805,6 +1806,7 @@ function initAdmin() { $('#password').attr('required', 'required'); } } else { + $('#user_name').attr('disabled', 'disabled'); $('#login_name').attr('required', 'required'); $('.non-local').show(); $('.local').hide(); -- cgit v1.2.3