1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-05 05:51:21 +03:00

AC-435. Fix JS error for making LDAP-managed fields readonly.

This commit is contained in:
Chris Church 2013-09-10 13:58:52 -04:00
parent 75aeb0cb84
commit 505b2b9998

View File

@ -375,7 +375,9 @@ 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']) {
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) {
@ -383,6 +385,7 @@ function UsersEdit ($scope, $rootScope, $compile, $location, $log, $routeParams,
}
}
}
}
$scope.$emit('formReady');
})
.error( function(data, status, headers, config) {