mirror of
https://github.com/ansible/awx.git
synced 2024-11-04 12:51:18 +03:00
AC-435. Fix JS error for making LDAP-managed fields readonly.
This commit is contained in:
parent
75aeb0cb84
commit
505b2b9998
@ -375,11 +375,14 @@ function UsersEdit ($scope, $rootScope, $compile, $location, $log, $routeParams,
|
||||
Rest.get()
|
||||
.success( function(data, status, headers, config) {
|
||||
if (data['user_ldap_fields']) {
|
||||
for (var fld in data['user_ldap_fields']) {
|
||||
form.fields[fld]['readonly'] = true;
|
||||
form.fields[fld]['editRequired'] = false;
|
||||
if (form.fields[fld].awRequiredWhen) {
|
||||
delete form.fields[fld].awRequiredWhen;
|
||||
for (var i in data['user_ldap_fields']) {
|
||||
var fld = data['user_ldap_fields'][i];
|
||||
if (form.fields[fld]) {
|
||||
form.fields[fld]['readonly'] = true;
|
||||
form.fields[fld]['editRequired'] = false;
|
||||
if (form.fields[fld].awRequiredWhen) {
|
||||
delete form.fields[fld].awRequiredWhen;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user