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