From e5ba0ce8bcef1ad24081dbc14eb6f8de71506476 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Mon, 15 Dec 2014 13:23:33 -0500 Subject: [PATCH] Survey maker/taker issue with int/floats = 0 fixed a defect with the survey maker/taker where floats/ints equal to zero weren't being displayed the entire way through --- awx/ui/static/js/helpers/JobSubmission.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/awx/ui/static/js/helpers/JobSubmission.js b/awx/ui/static/js/helpers/JobSubmission.js index d5830938c9..51c4b6121c 100644 --- a/awx/ui/static/js/helpers/JobSubmission.js +++ b/awx/ui/static/js/helpers/JobSubmission.js @@ -38,7 +38,7 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential } if(scope.survey_enabled===true){ for (fld in scope.job_launch_form){ - if(scope[fld]){ + if(scope[fld] || scope[fld] === 0){ job_launch_data[fld] = scope[fld]; } } @@ -462,8 +462,12 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi html += '
'+question.question_description+'
\n'; } - question.default = (question.default) ? question.default.replace(//g, ">") : undefined; + // if(question.default && question.default.indexOf('<') !== -1){ + // question.default = (question.default) ? question.default.replace(/') !== -1){ + // question.default = (question.default) ? question.default.replace(/>/g, ">") : undefined; + // } scope[question.variable] = question.default; if(question.type === 'text' ){