mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-07 05:03:26 +08:00
Merge pull request #4637 from aignatov-bio/ai-sci-7233-fix-show-password-for-edit-settings
Fix show password for edit settings [SCI-7233]
This commit is contained in:
commit
176f3c48e1
2 changed files with 8 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
$(document).on('turbolinks:load', function() {
|
||||
function initShowPassword() {
|
||||
$('.fas.fa-eye.show-password').remove();
|
||||
$.each($('input[type="password"]'), function(i, e) {
|
||||
$(`<i class="fas fa-eye show-password"
|
||||
style="
|
||||
|
@ -8,6 +9,10 @@ $(document).on('turbolinks:load', function() {
|
|||
"></i>`).insertAfter(e);
|
||||
$(e).parent().addClass('right-icon');
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('turbolinks:load', function() {
|
||||
initShowPassword()
|
||||
});
|
||||
|
||||
$(document).on('click', '.show-password', function() {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* false to set form to view mode.
|
||||
*/
|
||||
|
||||
/* global _ filesValidator animateSpinner FileTypeEnum */
|
||||
/* global _ filesValidator animateSpinner FileTypeEnum initShowPassword */
|
||||
|
||||
var forms = $('form[data-for]');
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
|||
form.find("[data-part='view']").hide();
|
||||
form.find("[data-part='edit']").show();
|
||||
form.find("[data-part='edit'] input:not([type='file']):not([type='submit']):first").focus();
|
||||
initShowPassword();
|
||||
} else {
|
||||
form.find("[data-part='view']").show();
|
||||
form.find("[data-part='edit'] input").blur();
|
||||
|
|
Loading…
Reference in a new issue