mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 05:01:19 -03:30
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:
parent
48853b6594
commit
a6977d138e
@ -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 });
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@ -40,7 +40,8 @@ angular.module('TeamFormDefinition', [])
|
||||
sourceField: 'name',
|
||||
addRequired: true,
|
||||
editRequired: true,
|
||||
ngClick: 'lookUpOrganization()'
|
||||
ngClick: 'lookUpOrganization()',
|
||||
awRequiredWhen: {variable: "teamrequired", init: "true" }
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -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',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user