mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
Merge pull request #3240 from jaredevantabor/email_notification
Making the username and password fields optional
This commit is contained in:
commit
a7a6aaa8ac
@ -149,6 +149,12 @@ export default
|
||||
if(field.type === 'number'){
|
||||
$scope[i] = Number($scope[i]);
|
||||
}
|
||||
if(field.name === "username" && $scope.notification_type.value === "email" && value === null){
|
||||
$scope[i] = "";
|
||||
}
|
||||
if(field.type === 'sensitive' && value === null){
|
||||
$scope[i] = "";
|
||||
}
|
||||
return $scope[i];
|
||||
}
|
||||
|
||||
|
||||
@ -223,6 +223,12 @@ export default
|
||||
if(field.type === 'number'){
|
||||
$scope[i] = Number($scope[i]);
|
||||
}
|
||||
if(field.name === "username" && $scope.notification_type.value === "email" && value === null){
|
||||
$scope[i] = "";
|
||||
}
|
||||
if(field.type === 'sensitive' && value === null){
|
||||
$scope[i] = "";
|
||||
}
|
||||
return $scope[i];
|
||||
}
|
||||
|
||||
|
||||
@ -59,10 +59,6 @@ export default function() {
|
||||
username: {
|
||||
label: 'Username',
|
||||
type: 'text',
|
||||
awRequiredWhen: {
|
||||
reqExpression: "email_required",
|
||||
init: "false"
|
||||
},
|
||||
ngShow: "notification_type.value == 'email' ",
|
||||
subForm: 'typeSubForm'
|
||||
},
|
||||
|
||||
@ -28,7 +28,7 @@ function () {
|
||||
obj.passwordLabel = ' Password';
|
||||
obj.email_required = true;
|
||||
obj.port_required = true;
|
||||
obj.password_required = true;
|
||||
obj.password_required = false;
|
||||
break;
|
||||
case 'slack':
|
||||
obj.tokenLabel =' Token';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user