mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 06:28:01 -03:30
Credentials
Fixed form validation issues when adding a cloud credential. The email address field was being required even though it wasn't visible.
This commit is contained in:
parent
cef468d060
commit
6156e3c456
@ -225,6 +225,7 @@ function CredentialsAdd($scope, $rootScope, $compile, $location, $log, $routePar
|
||||
|
||||
// Reset defaults
|
||||
$scope.formReset = function () {
|
||||
//DebugForm({ scope: $scope, form: CredentialForm });
|
||||
generator.reset();
|
||||
};
|
||||
|
||||
|
||||
@ -140,7 +140,7 @@ angular.module('CredentialFormDefinition', [])
|
||||
ngShow: "kind.value && kind.value !== 'aws' && " +
|
||||
"kind.value !== 'gce' && kind.value!=='azure'",
|
||||
awRequiredWhen: {
|
||||
variable: 'aws_required',
|
||||
variable: 'username_required',
|
||||
init: false
|
||||
},
|
||||
autocomplete: false
|
||||
@ -150,7 +150,7 @@ angular.module('CredentialFormDefinition', [])
|
||||
type: 'email',
|
||||
ngShow: "kind.value === 'gce'",
|
||||
awRequiredWhen: {
|
||||
variable: 'username_required',
|
||||
variable: 'email_required',
|
||||
init: false
|
||||
},
|
||||
autocomplete: false
|
||||
|
||||
@ -22,10 +22,11 @@ angular.module('CredentialsHelper', ['Utilities'])
|
||||
// Put things in a default state
|
||||
scope.usernameLabel = 'Username';
|
||||
scope.aws_required = false;
|
||||
scope.email_required = false;
|
||||
scope.rackspace_required = false;
|
||||
scope.sshKeyDataLabel = 'SSH Private Key';
|
||||
scope.username_required = false; // JT-- added username_required b/c mutliple 'kinds' need username to be required (GCE)
|
||||
scope.key_required = false; // JT -- doing the same for key and project
|
||||
scope.key_required = false; // JT -- doing the same for key and project
|
||||
scope.project_required = false;
|
||||
scope.subscription_required = false;
|
||||
|
||||
@ -46,9 +47,9 @@ angular.module('CredentialsHelper', ['Utilities'])
|
||||
scope.sshKeyDataLabel = 'SCM Private Key';
|
||||
break;
|
||||
case 'gce':
|
||||
scope.usernameLabel = 'Email Address';
|
||||
scope.usernameLabel = 'Service Account Email Address';
|
||||
scope.sshKeyDataLabel = 'RSA Private Key';
|
||||
scope.username_required = true;
|
||||
scope.email_required = true;
|
||||
scope.key_required = true;
|
||||
scope.project_required = true;
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user