diff --git a/awx/ui/client/src/scheduler/scheduleToggle.block.less b/awx/ui/client/src/scheduler/scheduleToggle.block.less
index 8beac5b45c..597594429a 100644
--- a/awx/ui/client/src/scheduler/scheduleToggle.block.less
+++ b/awx/ui/client/src/scheduler/scheduleToggle.block.less
@@ -4,13 +4,14 @@
.ScheduleToggle {
border-radius: 5px;
- border: 1px solid @default-icon;
- background-color: @default-icon;
+ border: 1px solid @default-link;
+ background-color: @default-link;
width: 42px;
margin-top: 2px;
cursor: pointer;
display: flex;
height: 18px;
+ overflow: hidden;
&.ScheduleToggle--disabled {
cursor: not-allowed;
@@ -23,10 +24,10 @@
}
.ScheduleToggle-switch {
- color: @default-interface-txt;
+ color: @default-link;
background-color: @default-bg;
margin-left: 7px;
- border-left: 1px solid @default-icon;
+ border-left: 1px solid @default-link;
margin-right: 0px;
text-align: center;
text-transform: uppercase;
diff --git a/awx/ui/client/src/shared/form-generator.js b/awx/ui/client/src/shared/form-generator.js
index 10923c5329..97ce9da934 100644
--- a/awx/ui/client/src/shared/form-generator.js
+++ b/awx/ui/client/src/shared/form-generator.js
@@ -768,8 +768,22 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
// toggle switches
if(field.type === 'toggleSwitch') {
- html += label();
- html += `
diff --git a/awx/ui/client/src/templates/job_templates/add-job-template/job-template-add.controller.js b/awx/ui/client/src/templates/job_templates/add-job-template/job-template-add.controller.js
index 8dcfff6b82..d1084ace4c 100644
--- a/awx/ui/client/src/templates/job_templates/add-job-template/job-template-add.controller.js
+++ b/awx/ui/client/src/templates/job_templates/add-job-template/job-template-add.controller.js
@@ -132,6 +132,10 @@
});
}
+ $scope.toggleForm = function(key) {
+ $scope[key] = !$scope[key];
+ };
+
// Update playbook select whenever project value changes
selectPlaybook = function (oldValue, newValue) {
var url;
@@ -262,7 +266,7 @@
}
}
}
-
+ data.ask_diff_mode_on_launch = $scope.ask_diff_mode_on_launch ? $scope.ask_diff_mode_on_launch : false;
data.ask_tags_on_launch = $scope.ask_tags_on_launch ? $scope.ask_tags_on_launch : false;
data.ask_skip_tags_on_launch = $scope.ask_skip_tags_on_launch ? $scope.ask_skip_tags_on_launch : false;
data.ask_limit_on_launch = $scope.ask_limit_on_launch ? $scope.ask_limit_on_launch : false;
diff --git a/awx/ui/client/src/templates/job_templates/edit-job-template/job-template-edit.controller.js b/awx/ui/client/src/templates/job_templates/edit-job-template/job-template-edit.controller.js
index 5d4002aa55..21a3728c91 100644
--- a/awx/ui/client/src/templates/job_templates/edit-job-template/job-template-edit.controller.js
+++ b/awx/ui/client/src/templates/job_templates/edit-job-template/job-template-edit.controller.js
@@ -191,6 +191,10 @@ export default
});
}
+ $scope.toggleForm = function(key) {
+ $scope[key] = !$scope[key];
+ };
+
$scope.jobTypeChange = function() {
sync_playbook_select2();
};
@@ -475,6 +479,7 @@ export default
}
}
+ data.ask_diff_mode_on_launch = $scope.ask_diff_mode_on_launch ? $scope.ask_diff_mode_on_launch : false;
data.ask_tags_on_launch = $scope.ask_tags_on_launch ? $scope.ask_tags_on_launch : false;
data.ask_skip_tags_on_launch = $scope.ask_skip_tags_on_launch ? $scope.ask_skip_tags_on_launch : false;
data.ask_limit_on_launch = $scope.ask_limit_on_launch ? $scope.ask_limit_on_launch : false;
diff --git a/awx/ui/client/src/templates/job_templates/factories/callback-help-init.factory.js b/awx/ui/client/src/templates/job_templates/factories/callback-help-init.factory.js
index e72220a4f0..a0549400cd 100644
--- a/awx/ui/client/src/templates/job_templates/factories/callback-help-init.factory.js
+++ b/awx/ui/client/src/templates/job_templates/factories/callback-help-init.factory.js
@@ -113,6 +113,9 @@ export default
scope.ask_skip_tags_on_launch = (data.ask_skip_tags_on_launch) ? true : false;
master.ask_skip_tags_on_launch = scope.ask_skip_tags_on_launch;
+ scope.ask_diff_mode_on_launch = (data.ask_diff_mode_on_launch) ? true : false;
+ master.ask_diff_mode_on_launch = scope.ask_diff_mode_on_launch;
+
scope.job_tag_options = (data.job_tags) ? data.job_tags.split(',')
.map((i) => ({name: i, label: i, value: i})) : [];
scope.job_tags = scope.job_tag_options;
diff --git a/awx/ui/client/src/templates/job_templates/job-template.form.js b/awx/ui/client/src/templates/job_templates/job-template.form.js
index b2b74be93b..6e7ce22f2a 100644
--- a/awx/ui/client/src/templates/job_templates/job-template.form.js
+++ b/awx/ui/client/src/templates/job_templates/job-template.form.js
@@ -248,6 +248,19 @@ function(NotificationsList, CompletedJobsList, i18n) {
},
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate)'
},
+ diff_mode: {
+ label: i18n._('Diff Mode'),
+ type: 'toggleSwitch',
+ toggleSource: 'diff_mode',
+ dataTitle: i18n._('Diff Mode'),
+ dataPlacement: 'right',
+ dataContainer: 'body',
+ awPopOver: "
" + i18n._("If enabled, textual changes made to any templated files on the host are shown in the standard output.") + "
",
+ subCheckbox: {
+ variable: 'ask_diff_mode_on_launch',
+ text: i18n._('Prompt on launch')
+ },
+ },
checkbox_group: {
label: i18n._('Options'),
type: 'checkbox_group',