mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 10:56:10 +01:00 
			
		
		
		
	Add option to change username to the admin panel (#14229)
Co-authored-by: Bwko <bouwko@gmail.com> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
		| @@ -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(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user