From 57443141c9821583f49830e83d0e35874ee6cd0b Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Mon, 30 Jun 2014 14:23:23 -0400 Subject: [PATCH] Job launch Fixed job launch of job templates page. --- awx/ui/static/js/helpers/JobSubmission.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/awx/ui/static/js/helpers/JobSubmission.js b/awx/ui/static/js/helpers/JobSubmission.js index f66cd5724b..c829467826 100644 --- a/awx/ui/static/js/helpers/JobSubmission.js +++ b/awx/ui/static/js/helpers/JobSubmission.js @@ -372,6 +372,7 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi return function (params) { var scope = params.scope, id = params.id, + base = $location.path().replace(/^\//, '').split('/')[0], url, job_template, new_job_id, @@ -380,7 +381,13 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi prompt_for_vars = false, passwords; - url = GetBasePath('jobs') + id + '/'; + if (base === 'job_templates') { + url = GetBasePath('job_templates'); + } + else { + url = GetBasePath('jobs'); + } + url += id + '/'; if (scope.removePostTheJob) { scope.removePostTheJob();