add pwd button (show/hide)

pull/2843/head
abarrau 2023-12-17 17:39:12 +01:00
rodzic b155011866
commit 1748e298ba
4 zmienionych plików z 42 dodań i 39 usunięć

Wyświetl plik

@ -3088,9 +3088,7 @@ function viewEqsl(picture, callsign) {
}
$('.icon_selectBox_data[data-boxcontent="'+boxcontent+'"]').hide();
});
$('.elapse-zone-header-icon').off('click').on('click', elapse_zone_header );
$('.help-tooltip').off('click').on('click', help_tooltip ); //.off('mouseleave').on('mouseleave', help_tooltip ) // .off('mouseenter').on('mouseenter', help_tooltip )
$('.elapse-zone-body div.small.text-muted').off('click').on('click', help_tooltip );
$('.btn-pwd-showhide').off('click').on('click', btn_pwd_showhide );
});
</script>
<?php } ?>

Wyświetl plik

@ -57,7 +57,10 @@
<div class="mb-3">
<label><?php echo lang('account_password'); ?></label>
<input class="form-control" type="password" name="user_password" />
<div class="input-group">
<input class="form-control" type="password" name="user_password" />
<span class="input-group-btn"><button class="btn btn-default btn-pwd-showhide" type="button"><i class="fa fa-eye-slash"></i></button></span>
</div>
<?php if(isset($password_error)) { echo "<small class=\"error\">".$password_error."</small>"; } else { ?>
<small class="form-text text-muted"><?php echo lang('account_leave_blank_to_keep_existing_password'); ?></small>
<?php } ?>
@ -322,10 +325,10 @@
</div>
</div>
<!-- QSO Page Settings -->
<!-- QSO Page Options -->
<div class="col-md">
<div class="card">
<div class="card-header">QSO Page Settings</div>
<div class="card-header">QSO Page Options</div>
<div class="card-body">
<div class="mb-3">
<label for="logendtime"><?php echo lang('account_log_end_time'); ?></label>
@ -400,7 +403,8 @@
<option value="0" <?php if ($user_show_notes == 0) { echo " selected =\"selected\""; } ?>><?php echo lang('general_word_no'); ?></option>
</select>
</div>
<hr/>
<div class="mb-3">
<label for="quicklog"><?php echo lang('account_quicklog_feature'); ?></label>
<select class="form-select" id="quicklog" name="user_quicklog">
@ -595,11 +599,11 @@
</div>
</div>
</div>
<!-- ZONE 4 / Validation Synchro -->
<!-- ZONE 4 / Confirmation Account -->
<div class="accordion-item">
<h2 class="accordion-header" id="panelsStayOpen-H_confirmation_account">
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-B_confirmation_account" aria-expanded="true" aria-controls="panelsStayOpen-B_confirmation_account">
Miscellaneous</button>
Confirmation Account</button>
</h2>
<div id="panelsStayOpen-B_confirmation_account" class="accordion-collapse collapse show" aria-labelledby="panelsStayOpen-H_confirmation_account">
<div class="accordion-body">
@ -617,10 +621,13 @@
<div class="mb-3">
<label><?php echo lang('account_logbook_of_the_world_lotw_password'); ?></label>
<input class="form-control" type="password" name="user_lotw_password" />
<?php if(isset($lotwpassword_error)) { echo "<small class=\"error\">".$lotwpassword_error."</small>"; } else { ?>
<small class="form-text text-muted"><?php echo lang('account_leave_blank_to_keep_existing_password'); ?></small>
<?php } ?>
<div class="input-group">
<input class="form-control" type="password" name="user_lotw_password" />
<span class="input-group-btn"><button class="btn btn-default btn-pwd-showhide" type="button"><i class="fa fa-eye-slash"></i></button></span>
</div>
<?php if(isset($lotwpassword_error)) { echo "<small class=\"error\">".$lotwpassword_error."</small>"; } else { ?>
<small class="form-text text-muted"><?php echo lang('account_leave_blank_to_keep_existing_password'); ?></small>
<?php } ?>
</div>
</div>
</div>
@ -639,10 +646,13 @@
<div class="mb-3">
<label><?php echo lang('account_eqslcc_password'); ?></label>
<input class="form-control" type="password" name="user_eqsl_password" />
<?php if(isset($eqslpassword_error)) { echo "<small class=\"error\">".$eqslpassword_error."</small>"; } else { ?>
<small class="form-text text-muted"><?php echo lang('account_leave_blank_to_keep_existing_password'); ?></small>
<?php } ?>
<div class="input-group">
<input class="form-control" type="password" name="user_eqsl_password" />
<span class="input-group-btn"><button class="btn btn-default btn-pwd-showhide" type="button"><i class="fa fa-eye-slash"></i></button></span>
</div>
<?php if(isset($eqslpassword_error)) { echo "<small class=\"error\">".$eqslpassword_error."</small>"; } else { ?>
<small class="form-text text-muted"><?php echo lang('account_leave_blank_to_keep_existing_password'); ?></small>
<?php } ?>
</div>
</div>
</div>
@ -662,10 +672,13 @@
<div class="mb-3">
<label><?php echo lang('account_clublog_password'); ?></label>
<input class="form-control" type="password" name="user_clublog_password" />
<?php if(isset($clublogpassword_error)) { echo "<small class=\"error\">".$clublogpassword_error."</small>"; } else { ?>
<small class="form-text text-muted"><?php echo lang('account_leave_blank_to_keep_existing_password'); ?></small>
<?php } ?>
<div class="input-group">
<input class="form-control" type="password" name="user_clublog_password" />
<span class="input-group-btn"><button class="btn btn-default btn-pwd-showhide" type="button"><i class="fa fa-eye-slash"></i></button></span>
</div>
<?php if(isset($clublogpassword_error)) { echo "<small class=\"error\">".$clublogpassword_error."</small>"; } else { ?>
<small class="form-text text-muted"><?php echo lang('account_leave_blank_to_keep_existing_password'); ?></small>
<?php } ?>
</div>
</div>
</div>

Wyświetl plik

@ -745,16 +745,6 @@ table.dataTable tfoot td {
overflow-x: unset;
}
/* Header zone (accordion) */
.user_edit .accordion-button {
border-top: 5px solid var(--cl-bg);
background-color: rgba(var(--bs-body-color-rgb), 0.03);
}
.user_edit .accordion-button:not(.collapsed) {
background-color: rgba(var(--bs-body-color-rgb), 0.05);
color: var(--bs-card-cap-color);
}
.user_edit .accordion-body {
background-color: var(--cl-bg);
border: 1px solid var(--bs-accordion-bg);
}
.btn-pwd-showhide, .btn-pwd-showhide:hover {
border: 1px solid var(--cl-border-btn-pwd);
}

Wyświetl plik

@ -574,11 +574,13 @@ function qso_set_eqsl_qslmsg(station_id, force_diff_to_origin=false, object='')
});
}
// [HELP ICON] function show/hide //
function help_tooltip() {
if ($(this).closest('div').find('div.small.text-muted').is(":hidden")) {
$(this).closest('div').find('div.small.text-muted').show();
// [PWD] button show/hide //
function btn_pwd_showhide() {
if ($(this).closest('div').find('input[type="password"]').length>0) {
$(this).closest('div').find('input[type="password"]').attr('type','text');
$(this).closest('div').find('.fa-eye-slash').removeClass('fa-eye-slash').addClass('fa-eye');
} else {
$(this).closest('div').find('div.small.text-muted').hide(); //fadeOut(4000);
$(this).closest('div').find('input[type="text"]').attr('type','password');
$(this).closest('div').find('.fa-eye').removeClass('Òfa-eye').addClass('fa-eye-slash');
}
}