diff --git a/awx/ui/static/js/helpers/JobSubmission.js b/awx/ui/static/js/helpers/JobSubmission.js
index 52f2bcccc7..c45573cb9e 100644
--- a/awx/ui/static/js/helpers/JobSubmission.js
+++ b/awx/ui/static/js/helpers/JobSubmission.js
@@ -517,6 +517,20 @@ function($compile, Rest, GetBasePath, TextareaResize,CreateDialog, GenerateForm,
checked, min, max,
survey_url = GetBasePath('job_templates') + id + '/survey_spec/' ;
+ //for toggling the input on password inputs
+ scope.toggleInput = function(id) {
+ var buttonId = id + "_show_input_button",
+ inputId = id,
+ buttonInnerHTML = $(buttonId).html();
+ if (buttonInnerHTML.indexOf("ABC") > -1) {
+ $(buttonId).html("");
+ $(inputId).attr("type", "text");
+ } else {
+ $(buttonId).html("ABC");
+ $(inputId).attr("type", "password");
+ }
+ };
+
function buildHtml(question, index){
question.index = index;
question.question_name = $filter('sanitize')(question.question_name);
@@ -573,28 +587,20 @@ function($compile, Rest, GetBasePath, TextareaResize,CreateDialog, GenerateForm,
if(question.type === 'password' ){
minlength = (!Empty(question.min)) ? Number(question.min) : "";
maxlength =(!Empty(question.max)) ? Number(question.max) : "" ;
- html+=''+
- '
Please enter an answer.
'+
- 'Please enter an answer between {{'+minlength+'}} to {{'+maxlength+'}} characters long.
'+
- '';
- html+=''+
- 'Please enter an answer.
'+
- 'Please enter an answer between {{'+minlength+'}} to {{'+maxlength+'}} characters long.
'+
- '';
- html+= '';
-
+ html+= ''+
+ ''+
+ ''+
+ ''+
+ ''+
+ '
'+
+ 'Please enter an answer.
'+
+ 'Please enter an answer between {{'+minlength+'}} to {{'+maxlength+'}} characters long.
'+
+ '';
}
if(question.type === 'multiplechoice'){
choices = question.choices.split(/\n/);
diff --git a/awx/ui/static/js/helpers/Survey.js b/awx/ui/static/js/helpers/Survey.js
index 78af9d3a7f..cbd67d0904 100644
--- a/awx/ui/static/js/helpers/Survey.js
+++ b/awx/ui/static/js/helpers/Survey.js
@@ -332,9 +332,13 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper',
defaultValue = $filter('sanitize')(defaultValue);
defaultValue = scope.serialize(defaultValue);
html+='';
+ ' '+
+ ''+
+ ''+
+ ''+
+ ''+
+ '
'+
+ '';
}
if(question.type === 'integer'){
diff --git a/awx/ui/static/less/survey-maker.less b/awx/ui/static/less/survey-maker.less
index 7c485bf2d7..cc8b5971fa 100644
--- a/awx/ui/static/less/survey-maker.less
+++ b/awx/ui/static/less/survey-maker.less
@@ -39,7 +39,11 @@
border-radius: 4px;
padding: 5px;
position: relative;
-
+
+ .survey-maker-password{
+ margin-left: 30px;
+ }
+
.final{
margin-left: 15px;
margin-top: 5px;