From bfa361c87f0c0dcf428a3bbae0cfc3316331e373 Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Fri, 23 Nov 2018 17:59:31 -0500 Subject: [PATCH] hide prompt button when not on jobs tab --- .../workflow-maker/forms/workflow-node-form.controller.js | 7 ++++++- .../workflow-maker/forms/workflow-node-form.partial.html | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.controller.js b/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.controller.js index 4f5a855b46..e622a31782 100644 --- a/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.controller.js +++ b/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.controller.js @@ -154,23 +154,28 @@ export default ['$scope', 'TemplatesService', 'JobTemplateModel', 'PromptService return $scope.strings.get('workflow_maker.INVENTORY_WILL_OVERRIDE'); } } - if (workflowJobTemplateObj.ask_inventory_on_launch) { + + if (workflowJobTemplateObj.ask_inventory_on_launch) { if (selectedTemplate.ask_inventory_on_launch) { return $scope.strings.get('workflow_maker.INVENTORY_PROMPT_WILL_OVERRIDE'); } } } + if (selectedTemplate.type === "job_template") { if (workflowJobTemplateObj.inventory) { if (selectedTemplate.ask_inventory_on_launch) { return $scope.strings.get('workflow_maker.INVENTORY_WILL_OVERRIDE'); } + return $scope.strings.get('workflow_maker.INVENTORY_WILL_NOT_OVERRIDE'); } + if (workflowJobTemplateObj.ask_inventory_on_launch) { if (selectedTemplate.ask_inventory_on_launch) { return $scope.strings.get('workflow_maker.INVENTORY_PROMPT_WILL_OVERRIDE'); } + return $scope.strings.get('workflow_maker.INVENTORY_PROMPT_WILL_NOT_OVERRIDE'); } } diff --git a/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.partial.html b/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.partial.html index ca232115b8..56ed5f85a0 100644 --- a/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.partial.html +++ b/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.partial.html @@ -236,7 +236,7 @@

- +