|
|
@@ -130,23 +130,53 @@
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <td class="vst-text">
|
|
|
- <?php print _('Your password must have at least');?>:
|
|
|
- <ul>
|
|
|
- <li><?php print _('8 characters long');?></li>
|
|
|
- <li><?php print _('1 uppercase & 1 lowercase character');?></li>
|
|
|
- <li><?php print _('1 number');?></li>
|
|
|
- </ul>
|
|
|
+ <td>
|
|
|
+ <table id="password-details">
|
|
|
+ <tr>
|
|
|
+ <td class="vst-text">
|
|
|
+ <?php print _('Your password must have at least');?>:
|
|
|
+ <ul>
|
|
|
+ <li><?php print _('8 characters long');?></li>
|
|
|
+ <li><?php print _('1 uppercase & 1 lowercase character');?></li>
|
|
|
+ <li><?php print _('1 number');?></li>
|
|
|
+ </ul>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <label><input type="checkbox" class="vst-checkbox password-option" name="v_twofa" <?php if(!empty($v_twofa)) echo "checked=yes" ?>><?php print _('Enable 2FA');?></label>
|
|
|
+ <?php if (!empty($v_twofa)) { ?>
|
|
|
+ <p><?php echo _('2FA Reset Code:').' '.$v_twofa; ?></br></p>
|
|
|
+ <p><?php echo _('Please scan the code below in your 2FA application:'); ?></p>
|
|
|
+ <div><img class="qr-code" src="<?php echo $v_qrcode; ?>"></div>
|
|
|
+ <?php } ?>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <? if ($_SESSION['userContext'] === 'admin') {?>
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <label><input type="checkbox" size="20" class="vst-checkbox" onclick="javascript:elementHideShow('password-details')" name="v_login_disabled" <?php if ((isset($data[$user]['LOGIN_DISABLED'])) && (!empty($data[$user]['LOGIN_DISABLED'])) && ($data[$user]['LOGIN_DISABLED'] == "yes")) echo "checked=yes" ?>><?php print _('User can not log in to Control Panel');?></label>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <? } ?>
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <label><input type="checkbox" size="20" class="vst-checkbox" onclick="javascript:elementHideShow('ip-allowlist')" name="v_login_use_iplist" <?php if ($data[$user]['LOGIN_USE_IPLIST'] === "yes") echo "checked=yes" ?>><?php print _('Only allow logins from certain IP addresses');?></label>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
- <label><input type="checkbox" class="vst-checkbox password-option" name="v_twofa" <?php if(!empty($v_twofa)) echo "checked=yes" ?>><?php print _('Enable 2FA');?></label>
|
|
|
- <?php if (!empty($v_twofa)) { ?>
|
|
|
- <p><?php echo _('2FA Reset Code:').' '.$v_twofa; ?></br></p>
|
|
|
- <p><?php echo _('Please scan the code below in your 2FA application:'); ?></p>
|
|
|
- <div><img class="qr-code" src="<?php echo $v_qrcode; ?>"></div>
|
|
|
- <?php } ?>
|
|
|
+ <table id="ip-allowlist" style="<? if ($data[$user]['LOGIN_USE_IPLIST'] === 'yes') { echo 'display: table-cell;'; } else { echo 'display: none;'; } ?>">
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <input type="text" size="20" class="vst-input" name="v_login_allowed_ups" value="<?=htmlentities(trim($v_login_allowed_ips, "'"))?>">
|
|
|
+ <input type="hidden" name="v_login_allowed_ips" value="<?=htmlentities(trim($v_login_allowed_ips, "'"))?>">
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
@@ -192,11 +222,6 @@
|
|
|
</tr>
|
|
|
<? } ?>
|
|
|
<? } ?>
|
|
|
- <tr>
|
|
|
- <td>
|
|
|
- <label><input type="checkbox" size="20" class="vst-checkbox" name="v_user_login_disabled" <?php if ((isset($data[$user]['LOGIN_DISABLED'])) && (!empty($data[$user]['LOGIN_DISABLED'])) && ($data[$user]['LOGIN_DISABLED'] == "yes")) echo "checked=yes" ?>><?php print _('User can not log in to Control Panel');?></label>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
<? if ($_SESSION['POLICY_USER_CHANGE_THEME'] !== 'no') {?>
|
|
|
<tr>
|
|
|
<td class="vst-text input-label">
|