Minor cleanups with OTP

This commit is contained in:
johnnyq 2021-08-18 22:35:34 -04:00
parent cdcd22ae6f
commit f726550356
3 changed files with 8 additions and 8 deletions

View File

@ -63,12 +63,12 @@
</div>
<div class="form-group">
<label>TOTP Key <strong class="text-danger">*</strong></label>
<label>OTP</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-key"></i></span>
</div>
<input type="text" class="form-control" name="otp_secret" placeholder="Leave Blank if not sure">
<input type="text" class="form-control" name="otp_secret" placeholder="Insert secret key">
</div>
</div>

View File

@ -93,10 +93,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
$login_password = $row['login_password'];
$login_otp_secret = $row['login_otp_secret'];
if(!empty($login_otp_secret)){
$otp = get_otp($login_otp_secret);
$otp = "<i class='far fa-clock text-secondary'></i> $otp<button class='btn btn-sm' data-clipboard-text='$otp'><i class='far fa-copy text-secondary'></i></button>";
$otp_display = get_otp($login_otp_secret);
$otp_display = "<i class='far fa-clock text-secondary'></i> $otp<button class='btn btn-sm' data-clipboard-text='$otp'><i class='far fa-copy text-secondary'></i></button>";
}else{
$otp = "-";
$otp_display = "-";
}
$login_note = $row['login_note'];
$vendor_id = $row['vendor_id'];
@ -115,7 +115,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<td><?php echo $login_username; ?><button class="btn btn-sm" data-clipboard-text="<?php echo $login_username; ?>"><i class="far fa-copy text-secondary"></i></button></td>
<td><?php echo $login_password; ?><button class="btn btn-sm" data-clipboard-text="<?php echo $login_password; ?>"><i class="far fa-copy text-secondary"></i></button></td>
</td>
<td><?php echo $otp; ?></td>
<td><?php echo $otp_display; ?></td>
<td>
<div class="dropdown dropleft text-center">
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">

View File

@ -66,12 +66,12 @@
</div>
<div class="form-group">
<label>TOTP Key <strong class="text-danger">*</strong></label>
<label>OTP</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-key"></i></span>
</div>
<input type="text" class="form-control" name="otp_secret" value="<?php echo $login_otp_secret; ?>" placeholder="Leave Blank if not sure">
<input type="text" class="form-control" name="otp_secret" value="<?php echo $login_otp_secret; ?>" placeholder="Insert secret key">
</div>
</div>