mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
fixed password button text
This commit is contained in:
parent
074e66219d
commit
a44c6c92d4
@ -249,20 +249,20 @@ export function CredentialsAdd($scope, $rootScope, $compile, $location, $log, $r
|
||||
if ($scope[fld + '_ask']) {
|
||||
$scope[fld] = 'ASK';
|
||||
$("#" + form.name + "_" + fld + "_input").attr("type", "text");
|
||||
$("#" + form.name + "_" + fld + "_show_input_button").html("<i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i>");
|
||||
$("#" + form.name + "_" + fld + "_show_input_button").html("Hide");
|
||||
if (associated !== "undefined") {
|
||||
$("#" + form.name + "_" + fld + "_input").attr("type", "password");
|
||||
$("#" + form.name + "_" + fld + "_show_input_button").html("ABC");
|
||||
$("#" + form.name + "_" + fld + "_show_input_button").html("Show");
|
||||
$scope[associated] = '';
|
||||
$scope[form.name + '_form'][associated].$setValidity('awpassmatch', true);
|
||||
}
|
||||
} else {
|
||||
$scope[fld] = '';
|
||||
$("#" + form.name + "_" + fld + "_input").attr("type", "password");
|
||||
$("#" + form.name + "_" + fld + "_show_input_button").html("ABC");
|
||||
$("#" + form.name + "_" + fld + "_show_input_button").html("Show");
|
||||
if (associated !== "undefined") {
|
||||
$("#" + form.name + "_" + fld + "_input").attr("type", "text");
|
||||
$("#" + form.name + "_" + fld + "_show_input_button").html("<i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i>");
|
||||
$("#" + form.name + "_" + fld + "_show_input_button").html("Hide");
|
||||
$scope[associated] = '';
|
||||
$scope[form.name + '_form'][associated].$setValidity('awpassmatch', true);
|
||||
}
|
||||
@ -308,7 +308,7 @@ export function CredentialsEdit($scope, $rootScope, $compile, $location, $log, $
|
||||
if (form.fields[fld].type === 'sensitive' && $scope[fld] === 'ASK') {
|
||||
// turn on 'ask' checkbox for password fields with value of 'ASK'
|
||||
$("#" + form.name + "_" + fld + "_input").attr("type", "text");
|
||||
$("#" + form.name + "_" + fld + "_show_input_button").html("<i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i>");
|
||||
$("#" + form.name + "_" + fld + "_show_input_button").html("Hide");
|
||||
$("#" + fld + "-clear-btn").attr("disabled", "disabled");
|
||||
$scope[fld + '_ask'] = true;
|
||||
} else {
|
||||
@ -545,7 +545,7 @@ export function CredentialsEdit($scope, $rootScope, $compile, $location, $log, $
|
||||
if ($scope[fld + '_ask']) {
|
||||
$scope[fld] = 'ASK';
|
||||
$("#" + form.name + "_" + fld + "_input").attr("type", "text");
|
||||
$("#" + form.name + "_" + fld + "_show_input_button").html("<i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i>");
|
||||
$("#" + form.name + "_" + fld + "_show_input_button").html("Hide");
|
||||
if (associated !== "undefined") {
|
||||
$("#" + form.name + "_" + fld + "_input").attr("type", "password");
|
||||
$("#" + form.name + "_" + fld + "_show_input_button").html("ABC");
|
||||
@ -558,7 +558,7 @@ export function CredentialsEdit($scope, $rootScope, $compile, $location, $log, $
|
||||
$("#" + form.name + "_" + fld + "_show_input_button").html("ABC");
|
||||
if (associated !== "undefined") {
|
||||
$("#" + form.name + "_" + fld + "_input").attr("type", "text");
|
||||
$("#" + form.name + "_" + fld + "_show_input_button").html("<i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i>");
|
||||
$("#" + form.name + "_" + fld + "_show_input_button").html("Hide");
|
||||
$scope[associated] = '';
|
||||
$scope[form.name + '_form'][associated].$setValidity('awpassmatch', true);
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ export default
|
||||
'<div>'+
|
||||
'<div class="input-group">'+
|
||||
'<span class="input-group-btn">'+
|
||||
'<button class="btn btn-default" id="default_password_show_input_button" aw-tool-tip="Toggle the display of plaintext." aw-tip-placement="top" ng-click="toggleInput("#default_password")" data-original-title="" title="">ABC</button>'+
|
||||
'<button class="btn btn-default show_input_button" id="default_password_show_input_button" aw-tool-tip="Toggle the display of plaintext." aw-tip-placement="top" ng-click="toggleInput("#default_password")" data-original-title="" title="">ABC</button>'+
|
||||
'</span>'+
|
||||
'<input id="default_password" type="password" ng-model="default_password" name="default_password" class="form-control ng-pristine ng-valid-api-error ng-invalid" autocomplete="false">'+
|
||||
'</div>'+
|
||||
|
@ -522,11 +522,11 @@ function($compile, Rest, GetBasePath, TextareaResize,CreateDialog, GenerateForm,
|
||||
var buttonId = id + "_show_input_button",
|
||||
inputId = id,
|
||||
buttonInnerHTML = $(buttonId).html();
|
||||
if (buttonInnerHTML.indexOf("ABC") > -1) {
|
||||
$(buttonId).html("<i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i>");
|
||||
if (buttonInnerHTML.indexOf("Show") > -1) {
|
||||
$(buttonId).html("Hide");
|
||||
$(inputId).attr("type", "text");
|
||||
} else {
|
||||
$(buttonId).html("ABC");
|
||||
$(buttonId).html("Show");
|
||||
$(inputId).attr("type", "password");
|
||||
}
|
||||
};
|
||||
@ -589,7 +589,7 @@ function($compile, Rest, GetBasePath, TextareaResize,CreateDialog, GenerateForm,
|
||||
maxlength =(!Empty(question.max)) ? Number(question.max) : "" ;
|
||||
html+= '<div class="input-group">'+
|
||||
'<span class="input-group-btn">'+
|
||||
'<button class="btn btn-default" id="'+question.variable +'_show_input_button" aw-tool-tip="Toggle the display of plaintext." aw-tip-placement="top" ng-click="toggleInput("#'+question.variable+'")" data-original-title="" title="">ABC</button>'+
|
||||
'<button class="btn btn-default show_input_button" id="'+question.variable +'_show_input_button" aw-tool-tip="Toggle the display of plaintext." aw-tip-placement="top" ng-click="toggleInput("#'+question.variable+'")" data-original-title="" title="">ABC</button>'+
|
||||
'</span>'+
|
||||
'<input id="'+question.variable+'" type="password" ng-model="'+question.variable+'" name="'+question.variable+'" '+
|
||||
'ng-required="'+question.required+'"'+
|
||||
|
@ -334,7 +334,7 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper',
|
||||
html+='<div class="row">'+
|
||||
' <div class="col-xs-8 input_area input-group">'+
|
||||
'<span class="input-group-btn">'+
|
||||
'<button class="btn btn-default survey-maker-password" id="'+question.variable+'_show_input_button" aw-tool-tip="Toggle the display of plaintext." aw-tip-placement="top" ng-click="toggleInput("#'+question.variable+'")" data-original-title="" title="">ABC</button>'+
|
||||
'<button class="btn btn-default survey-maker-password show_input_button" id="'+question.variable+'_show_input_button" aw-tool-tip="Toggle the display of plaintext." aw-tip-placement="top" ng-click="toggleInput("#'+question.variable+'")" data-original-title="" title="">ABC</button>'+
|
||||
'</span>'+
|
||||
'<input id="'+ question.variable +'" type="password" ng-model="default_password" name="'+ question.variable +'" class="form-control ng-pristine ng-valid-api-error ng-invalid" autocomplete="false" readonly>'+
|
||||
'</div>'+
|
||||
@ -1039,11 +1039,11 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper',
|
||||
var buttonId = id + "_show_input_button",
|
||||
inputId = id,
|
||||
buttonInnerHTML = $(buttonId).html();
|
||||
if (buttonInnerHTML.indexOf("ABC") > -1) {
|
||||
$(buttonId).html("<i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i>");
|
||||
if (buttonInnerHTML.indexOf("Show") > -1) {
|
||||
$(buttonId).html("Hide");
|
||||
$(inputId).attr("type", "text");
|
||||
} else {
|
||||
$(buttonId).html("ABC");
|
||||
$(buttonId).html("Show");
|
||||
$(inputId).attr("type", "password");
|
||||
}
|
||||
};
|
||||
|
@ -870,7 +870,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
|
||||
//fields with sensitive data that needs to be obfuscated from view
|
||||
if (field.type === 'sensitive') {
|
||||
field.showInputInnerHTML = "ABC";
|
||||
field.showInputInnerHTML = "Show";
|
||||
field.inputType = "password";
|
||||
|
||||
html += "\t" + label();
|
||||
@ -879,11 +879,11 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
var buttonId = id + "_show_input_button",
|
||||
inputId = id + "_input",
|
||||
buttonInnerHTML = $(buttonId).html();
|
||||
if (buttonInnerHTML.indexOf("ABC") > -1) {
|
||||
$(buttonId).html("<i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i>");
|
||||
if (buttonInnerHTML.indexOf("Show") > -1) {
|
||||
$(buttonId).html("Hide");
|
||||
$(inputId).attr("type", "text");
|
||||
} else {
|
||||
$(buttonId).html("ABC");
|
||||
$(buttonId).html("Show");
|
||||
$(inputId).attr("type", "password");
|
||||
}
|
||||
};
|
||||
@ -892,7 +892,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
html += "'>\n";
|
||||
// TODO: make it so that the button won't show up if the mode is edit, hasShowInputButton !== true, and there are no contents in the field.
|
||||
html += "<span class='input-group-btn'>\n";
|
||||
html += "<button class='btn btn-default' ";
|
||||
html += "<button class='btn btn-default show_input_button' ";
|
||||
html += buildId(field, fld + "_show_input_button", this.form);
|
||||
html += "aw-tool-tip='Toggle the display of plaintext.' aw-tip-placement='top' ";
|
||||
html += "ng-click='" + fld + "_field.toggleInput(\"#" + this.form.name + "_" + fld + "\")'";
|
||||
|
@ -1988,3 +1988,7 @@ tr td button i {
|
||||
.panel-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.show_input_button {
|
||||
width: 73px;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user