diff --git a/awx/ui/static/js/forms/SurveyQuestion.js b/awx/ui/static/js/forms/SurveyQuestion.js index 523dff3a2a..3d3cb80819 100644 --- a/awx/ui/static/js/forms/SurveyQuestion.js +++ b/awx/ui/static/js/forms/SurveyQuestion.js @@ -3,7 +3,7 @@ * * All Rights Reserved *************************************************/ - + /** * @ngdoc function * @name forms.function:Questions @@ -274,17 +274,35 @@ export default default_password: { realName: 'default_answer' , type: 'custom' , - control: '
'+ - ''+ + control: '
'+ + ''+ '
'+ - ''+ - ''+ - ''+ - '
The answer is shorter than the minimium length. Please make the answer longer.
' + - '
The answer is longer than the maximum length. Please make the answer shorter.
' + - '
'+ + '
'+ + ''+ + ''+ + ''+ + ''+ + '
'+ + '
'+ + 'Please enter an answer from the choices listed.
'+ + 'The answer is shorter than the minimium length. Please make the answer longer.
'+ + '
'+ + 'The answer is longer than the maximum length. Please make the answer shorter.
'+ + '
'+ '
'+ '
', + + // control: '
'+ + // ''+ + // '
'+ + // ''+ + // ''+ + // ''+ + // '
The answer is shorter than the minimium length. Please make the answer longer.
' + + // '
The answer is longer than the maximum length. Please make the answer shorter.
' + + // '
'+ + // '
'+ + // '
', column: 2, ngShow: 'type.type === "password" ' }, diff --git a/awx/ui/static/js/helpers/Survey.js b/awx/ui/static/js/helpers/Survey.js index 5e740ea7c4..bf008a2135 100644 --- a/awx/ui/static/js/helpers/Survey.js +++ b/awx/ui/static/js/helpers/Survey.js @@ -3,7 +3,7 @@ * * All Rights Reserved *************************************************/ - + /** * @ngdoc function * @name helpers.function:Survey @@ -1027,5 +1027,19 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', } }; + //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"); + } + }; + }; }]);