diff --git a/awx/ui/client/src/job-submission/job-submission.block.less b/awx/ui/client/src/job-submission/job-submission.block.less index 3ea394c1e0..15d93c95cb 100644 --- a/awx/ui/client/src/job-submission/job-submission.block.less +++ b/awx/ui/client/src/job-submission/job-submission.block.less @@ -216,5 +216,5 @@ margin-bottom: 15px; } .JobSubmission-passwordButton { - padding: 7px 15px!important; + padding: 5px 13px!important; } diff --git a/awx/ui/client/src/job-submission/job-submission.controller.js b/awx/ui/client/src/job-submission/job-submission.controller.js index 4f9c28ea9a..b25e463ee9 100644 --- a/awx/ui/client/src/job-submission/job-submission.controller.js +++ b/awx/ui/client/src/job-submission/job-submission.controller.js @@ -174,6 +174,7 @@ export default if($scope.ask_variables_on_launch) { $scope.variables = (data.defaults && data.defaults.extra_vars) ? data.defaults.extra_vars : "---"; + $scope.other_prompt_data.parseType = 'yaml'; $scope.parseType = 'yaml'; } @@ -258,7 +259,7 @@ export default } else if(step === "otherprompts") { $scope.otherPromptsTabEnabled = true; - if(!$scope.extra_vars_code_mirror_loaded) { + if($scope.ask_variables_on_launch && !$scope.extra_vars_code_mirror_loaded) { ParseTypeChange({ scope: $scope, field_id: 'job_launch_variables' @@ -514,5 +515,14 @@ export default } }; + $scope.updateParseType = function() { + // This is what the ParseTypeChange factory is expecting + // It shares the same scope with this directive and will + // pull the new value of parseType out to determine which + // direction to convert the extra vars + $scope.parseType = $scope.other_prompt_data.parseType; + $scope.parseTypeChange(); + }; + } ]; diff --git a/awx/ui/client/src/job-submission/job-submission.partial.html b/awx/ui/client/src/job-submission/job-submission.partial.html index 39299a01a9..76e17adc58 100644 --- a/awx/ui/client/src/job-submission/job-submission.partial.html +++ b/awx/ui/client/src/job-submission/job-submission.partial.html @@ -52,41 +52,53 @@ -
- -
Please enter a password.
-
+
+ + + +
+
Please enter a password.
+
-
- -
Please enter a password.
-
+
+ + + +
+
Please enter a password.
+
-
- -
Please enter a password.
-
+
+ + + +
+
Please enter a password.
+
-
- -
Please enter a password.
-
+
+ + + +
+
Please enter a password.
+
@@ -101,9 +113,9 @@
- + YAML - + JSON
@@ -152,12 +164,12 @@
- +
Please enter an answer.
Please enter an answer between {{question.minlength}} to {{question.maxlength}} characters long.
- +
Please enter an answer.
Please enter an answer between {{question.minlength}} to {{question.maxlength}} characters long.
@@ -166,19 +178,19 @@ - +
Please enter an answer.
Please enter an answer between {{question.minlength}} to {{question.maxlength}} characters long.
- +
Please enter an answer.
Please enter an answer that is a valid integer.
Please enter an answer between {{question.minValue}} and {{question.maxValue}}.
- +
Please enter an answer.
Please enter an answer that is a decimal number.
Please enter an answer between {{question.minValue}} and {{question.maxValue}}.