mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 04:31:21 -03:30
Making the username and password fields optional
for email notifications
This commit is contained in:
parent
9ab3aae59d
commit
d8c713d5ef
@ -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