AC-297 Fixed similar issue when adding new User and adding new Team. In both cases Organization value was not being required by UI. Instead it relied on API error message. Works fine for admin user, but falls apart for non-privileged user. For non-priv users, the API runs into a query issue and sends back an error message that leaves the user confused. Now UI is correctly requiring a value befor allowing user to save.

This commit is contained in:
chouseknecht 2013-07-28 08:25:57 -04:00
parent 48853b6594
commit a6977d138e
3 changed files with 5 additions and 3 deletions

View File

@ -129,7 +129,7 @@ function TeamsAdd ($scope, $rootScope, $compile, $location, $log, $routeParams,
})
.error( function(data, status, headers, config) {
ProcessErrors(scope, data, status, form,
{ hdr: 'Error!', msg: 'Failed to add new inventory. Post returned status: ' + status });
{ hdr: 'Error!', msg: 'Failed to add new team. Post returned status: ' + status });
});
};

View File

@ -40,7 +40,8 @@ angular.module('TeamFormDefinition', [])
sourceField: 'name',
addRequired: true,
editRequired: true,
ngClick: 'lookUpOrganization()'
ngClick: 'lookUpOrganization()',
awRequiredWhen: {variable: "teamrequired", init: "true" }
}
},

View File

@ -49,7 +49,8 @@ angular.module('UserFormDefinition', [])
addRequired: true,
editRequired: true,
ngClick: 'lookUpOrganization()',
excludeMode: 'edit'
excludeMode: 'edit',
awRequiredWhen: {variable: "orgrequired", init: "true" }
},
username: {
label: 'Username',