diff --git a/awx/ui/client/src/forms/JobTemplates.js b/awx/ui/client/src/forms/JobTemplates.js index 090f54f2a1..c75c27a96a 100644 --- a/awx/ui/client/src/forms/JobTemplates.js +++ b/awx/ui/client/src/forms/JobTemplates.js @@ -225,29 +225,34 @@ export default text: 'Prompt on launch' } }, - become_enabled: { - label: 'Enable Privilege Escalation', - type: 'checkbox', - addRequired: false, - editRequird: false, - column: 2, - awPopOver: "

If enabled, run this playbook as an administrator. This is the equivalent of passing the --become option to the ansible-playbook command.

", - dataPlacement: 'right', - dataTitle: 'Become Privilege Escalation', - dataContainer: "body" - }, - allow_callbacks: { - label: 'Allow Provisioning Callbacks', - type: 'checkbox', - addRequired: false, - editRequird: false, - ngChange: "toggleCallback('host_config_key')", - column: 2, - awPopOver: "

Enables creation of a provisioning callback URL. Using the URL a host can contact Tower and request a configuration update " + - "using this job template.

", - dataPlacement: 'right', - dataTitle: 'Allow Provisioning Callbacks', - dataContainer: "body" + checkbox_group: { + label: 'Options', + type: 'checkbox_group', + fields: [{ + name: 'become_enabled', + label: 'Enable Privilege Escalation', + type: 'checkbox', + addRequired: false, + editRequird: false, + column: 2, + awPopOver: "

If enabled, run this playbook as an administrator. This is the equivalent of passing the --become option to the ansible-playbook command.

", + dataPlacement: 'right', + dataTitle: 'Become Privilege Escalation', + dataContainer: "body" + }, { + name: 'allow_callbacks', + label: 'Allow Provisioning Callbacks', + type: 'checkbox', + addRequired: false, + editRequird: false, + ngChange: "toggleCallback('host_config_key')", + column: 2, + awPopOver: "

Enables creation of a provisioning callback URL. Using the URL a host can contact Tower and request a configuration update " + + "using this job template.

", + dataPlacement: 'right', + dataTitle: 'Allow Provisioning Callbacks', + dataContainer: "body" + }] }, callback_url: { label: 'Provisioning Callback URL', diff --git a/awx/ui/client/src/helpers/JobTemplates.js b/awx/ui/client/src/helpers/JobTemplates.js index 29e9ff8d4c..88087ef44f 100644 --- a/awx/ui/client/src/helpers/JobTemplates.js +++ b/awx/ui/client/src/helpers/JobTemplates.js @@ -110,6 +110,11 @@ angular.module('JobTemplatesHelper', ['Utilities']) master[form.fields[fld].sourceModel + '_' + form.fields[fld].sourceField] = scope[form.fields[fld].sourceModel + '_' + form.fields[fld].sourceField]; } + if (form.fields[fld].type === 'checkbox_group') { + for(var j=0; j