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() Rest.get()
.success( function(data, status, headers, config) { .success( function(data, status, headers, config) {
if (data['user_ldap_fields']) { 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]['readonly'] = true;
form.fields[fld]['editRequired'] = false; form.fields[fld]['editRequired'] = false;
if (form.fields[fld].awRequiredWhen) { if (form.fields[fld].awRequiredWhen) {
@@ -383,6 +385,7 @@ function UsersEdit ($scope, $rootScope, $compile, $location, $log, $routeParams,
} }
} }
} }
}
$scope.$emit('formReady'); $scope.$emit('formReady');
}) })
.error( function(data, status, headers, config) { .error( function(data, status, headers, config) {