mirror of
https://github.com/ansible/awx.git
synced 2026-02-22 21:46:00 -03:30
Merge pull request #2442 from jaredevantabor/manual-group-notifications
Disabling notifications related button for manual groups
This commit is contained in:
@@ -350,9 +350,9 @@ export default
|
|||||||
|
|
||||||
for (itm in GroupFormObject.related) {
|
for (itm in GroupFormObject.related) {
|
||||||
if (GroupFormObject.related[itm].include === "NotificationsList") {
|
if (GroupFormObject.related[itm].include === "NotificationsList") {
|
||||||
GroupFormObject.related[itm] = NotificationsList;
|
GroupFormObject.related[itm] = angular.copy(NotificationsList);
|
||||||
GroupFormObject.related[itm].generateList = true;
|
GroupFormObject.related[itm].generateList = true;
|
||||||
GroupFormObject.related[itm].disabled = "source === undefined";
|
GroupFormObject.related[itm].disabled = "source === undefined || source.value === ''";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return GroupFormObject;
|
return GroupFormObject;
|
||||||
|
|||||||
@@ -1519,7 +1519,11 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
html += `<div id="${itm}_tab"`+
|
html += `<div id="${itm}_tab"`+
|
||||||
`class="Form-tab"`+
|
`class="Form-tab"`+
|
||||||
`ng-click="${this.form.related[itm].disabled} || toggleFormTabs($event)"` +
|
`ng-click="${this.form.related[itm].disabled} || toggleFormTabs($event)"` +
|
||||||
`ng-class="{'is-selected': ${itm}Selected, 'Form-tab--disabled' : ${this.form.related[itm].disabled }}">${(collection.title || collection.editTitle)} </div>`;
|
`ng-class="{'is-selected': ${itm}Selected ` ;
|
||||||
|
if(this.form.related[itm].disabled){
|
||||||
|
html += `, 'Form-tab--disabled' : ${this.form.related[itm].disabled }`;
|
||||||
|
}
|
||||||
|
html += `}">${(collection.title || collection.editTitle)}</div>`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(this.mode === "add"){
|
else if(this.mode === "add"){
|
||||||
|
|||||||
Reference in New Issue
Block a user