mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
fixed password button text
This commit is contained in:
@@ -249,20 +249,20 @@ export function CredentialsAdd($scope, $rootScope, $compile, $location, $log, $r
|
|||||||
if ($scope[fld + '_ask']) {
|
if ($scope[fld + '_ask']) {
|
||||||
$scope[fld] = 'ASK';
|
$scope[fld] = 'ASK';
|
||||||
$("#" + form.name + "_" + fld + "_input").attr("type", "text");
|
$("#" + 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") {
|
if (associated !== "undefined") {
|
||||||
$("#" + form.name + "_" + fld + "_input").attr("type", "password");
|
$("#" + 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[associated] = '';
|
||||||
$scope[form.name + '_form'][associated].$setValidity('awpassmatch', true);
|
$scope[form.name + '_form'][associated].$setValidity('awpassmatch', true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$scope[fld] = '';
|
$scope[fld] = '';
|
||||||
$("#" + form.name + "_" + fld + "_input").attr("type", "password");
|
$("#" + 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") {
|
if (associated !== "undefined") {
|
||||||
$("#" + form.name + "_" + fld + "_input").attr("type", "text");
|
$("#" + 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[associated] = '';
|
||||||
$scope[form.name + '_form'][associated].$setValidity('awpassmatch', true);
|
$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') {
|
if (form.fields[fld].type === 'sensitive' && $scope[fld] === 'ASK') {
|
||||||
// turn on 'ask' checkbox for password fields with value of 'ASK'
|
// turn on 'ask' checkbox for password fields with value of 'ASK'
|
||||||
$("#" + form.name + "_" + fld + "_input").attr("type", "text");
|
$("#" + 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");
|
$("#" + fld + "-clear-btn").attr("disabled", "disabled");
|
||||||
$scope[fld + '_ask'] = true;
|
$scope[fld + '_ask'] = true;
|
||||||
} else {
|
} else {
|
||||||
@@ -545,7 +545,7 @@ export function CredentialsEdit($scope, $rootScope, $compile, $location, $log, $
|
|||||||
if ($scope[fld + '_ask']) {
|
if ($scope[fld + '_ask']) {
|
||||||
$scope[fld] = 'ASK';
|
$scope[fld] = 'ASK';
|
||||||
$("#" + form.name + "_" + fld + "_input").attr("type", "text");
|
$("#" + 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") {
|
if (associated !== "undefined") {
|
||||||
$("#" + form.name + "_" + fld + "_input").attr("type", "password");
|
$("#" + form.name + "_" + fld + "_input").attr("type", "password");
|
||||||
$("#" + form.name + "_" + fld + "_show_input_button").html("ABC");
|
$("#" + 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");
|
$("#" + form.name + "_" + fld + "_show_input_button").html("ABC");
|
||||||
if (associated !== "undefined") {
|
if (associated !== "undefined") {
|
||||||
$("#" + form.name + "_" + fld + "_input").attr("type", "text");
|
$("#" + 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[associated] = '';
|
||||||
$scope[form.name + '_form'][associated].$setValidity('awpassmatch', true);
|
$scope[form.name + '_form'][associated].$setValidity('awpassmatch', true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -266,7 +266,7 @@ export default
|
|||||||
'<div>'+
|
'<div>'+
|
||||||
'<div class="input-group">'+
|
'<div class="input-group">'+
|
||||||
'<span class="input-group-btn">'+
|
'<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>'+
|
'</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">'+
|
'<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>'+
|
'</div>'+
|
||||||
|
|||||||
@@ -522,11 +522,11 @@ function($compile, Rest, GetBasePath, TextareaResize,CreateDialog, GenerateForm,
|
|||||||
var buttonId = id + "_show_input_button",
|
var buttonId = id + "_show_input_button",
|
||||||
inputId = id,
|
inputId = id,
|
||||||
buttonInnerHTML = $(buttonId).html();
|
buttonInnerHTML = $(buttonId).html();
|
||||||
if (buttonInnerHTML.indexOf("ABC") > -1) {
|
if (buttonInnerHTML.indexOf("Show") > -1) {
|
||||||
$(buttonId).html("<i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i>");
|
$(buttonId).html("Hide");
|
||||||
$(inputId).attr("type", "text");
|
$(inputId).attr("type", "text");
|
||||||
} else {
|
} else {
|
||||||
$(buttonId).html("ABC");
|
$(buttonId).html("Show");
|
||||||
$(inputId).attr("type", "password");
|
$(inputId).attr("type", "password");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -589,7 +589,7 @@ function($compile, Rest, GetBasePath, TextareaResize,CreateDialog, GenerateForm,
|
|||||||
maxlength =(!Empty(question.max)) ? Number(question.max) : "" ;
|
maxlength =(!Empty(question.max)) ? Number(question.max) : "" ;
|
||||||
html+= '<div class="input-group">'+
|
html+= '<div class="input-group">'+
|
||||||
'<span class="input-group-btn">'+
|
'<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>'+
|
'</span>'+
|
||||||
'<input id="'+question.variable+'" type="password" ng-model="'+question.variable+'" name="'+question.variable+'" '+
|
'<input id="'+question.variable+'" type="password" ng-model="'+question.variable+'" name="'+question.variable+'" '+
|
||||||
'ng-required="'+question.required+'"'+
|
'ng-required="'+question.required+'"'+
|
||||||
|
|||||||
@@ -334,7 +334,7 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper',
|
|||||||
html+='<div class="row">'+
|
html+='<div class="row">'+
|
||||||
' <div class="col-xs-8 input_area input-group">'+
|
' <div class="col-xs-8 input_area input-group">'+
|
||||||
'<span class="input-group-btn">'+
|
'<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>'+
|
'</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>'+
|
'<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>'+
|
'</div>'+
|
||||||
@@ -1039,11 +1039,11 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper',
|
|||||||
var buttonId = id + "_show_input_button",
|
var buttonId = id + "_show_input_button",
|
||||||
inputId = id,
|
inputId = id,
|
||||||
buttonInnerHTML = $(buttonId).html();
|
buttonInnerHTML = $(buttonId).html();
|
||||||
if (buttonInnerHTML.indexOf("ABC") > -1) {
|
if (buttonInnerHTML.indexOf("Show") > -1) {
|
||||||
$(buttonId).html("<i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i>");
|
$(buttonId).html("Hide");
|
||||||
$(inputId).attr("type", "text");
|
$(inputId).attr("type", "text");
|
||||||
} else {
|
} else {
|
||||||
$(buttonId).html("ABC");
|
$(buttonId).html("Show");
|
||||||
$(inputId).attr("type", "password");
|
$(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
|
//fields with sensitive data that needs to be obfuscated from view
|
||||||
if (field.type === 'sensitive') {
|
if (field.type === 'sensitive') {
|
||||||
field.showInputInnerHTML = "ABC";
|
field.showInputInnerHTML = "Show";
|
||||||
field.inputType = "password";
|
field.inputType = "password";
|
||||||
|
|
||||||
html += "\t" + label();
|
html += "\t" + label();
|
||||||
@@ -879,11 +879,11 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
var buttonId = id + "_show_input_button",
|
var buttonId = id + "_show_input_button",
|
||||||
inputId = id + "_input",
|
inputId = id + "_input",
|
||||||
buttonInnerHTML = $(buttonId).html();
|
buttonInnerHTML = $(buttonId).html();
|
||||||
if (buttonInnerHTML.indexOf("ABC") > -1) {
|
if (buttonInnerHTML.indexOf("Show") > -1) {
|
||||||
$(buttonId).html("<i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i><i class=\"fa fa-asterisk\"></i>");
|
$(buttonId).html("Hide");
|
||||||
$(inputId).attr("type", "text");
|
$(inputId).attr("type", "text");
|
||||||
} else {
|
} else {
|
||||||
$(buttonId).html("ABC");
|
$(buttonId).html("Show");
|
||||||
$(inputId).attr("type", "password");
|
$(inputId).attr("type", "password");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -892,7 +892,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
html += "'>\n";
|
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.
|
// 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 += "<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 += buildId(field, fld + "_show_input_button", this.form);
|
||||||
html += "aw-tool-tip='Toggle the display of plaintext.' aw-tip-placement='top' ";
|
html += "aw-tool-tip='Toggle the display of plaintext.' aw-tip-placement='top' ";
|
||||||
html += "ng-click='" + fld + "_field.toggleInput(\"#" + this.form.name + "_" + fld + "\")'";
|
html += "ng-click='" + fld + "_field.toggleInput(\"#" + this.form.name + "_" + fld + "\")'";
|
||||||
|
|||||||
@@ -1988,3 +1988,7 @@ tr td button i {
|
|||||||
.panel-title {
|
.panel-title {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.show_input_button {
|
||||||
|
width: 73px;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user