|
130 | 130 | </td> |
131 | 131 | </tr> |
132 | 132 | <tr> |
133 | | - <td class="vst-text"> |
134 | | - <?php print _('Your password must have at least');?>: |
135 | | - <ul> |
136 | | - <li><?php print _('8 characters long');?></li> |
137 | | - <li><?php print _('1 uppercase & 1 lowercase character');?></li> |
138 | | - <li><?php print _('1 number');?></li> |
139 | | - </ul> |
| 133 | + <td> |
| 134 | + <table id="password-details"> |
| 135 | + <tr> |
| 136 | + <td class="vst-text"> |
| 137 | + <?php print _('Your password must have at least');?>: |
| 138 | + <ul> |
| 139 | + <li><?php print _('8 characters long');?></li> |
| 140 | + <li><?php print _('1 uppercase & 1 lowercase character');?></li> |
| 141 | + <li><?php print _('1 number');?></li> |
| 142 | + </ul> |
| 143 | + </td> |
| 144 | + </tr> |
| 145 | + <tr> |
| 146 | + <td> |
| 147 | + <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> |
| 148 | + <?php if (!empty($v_twofa)) { ?> |
| 149 | + <p><?php echo _('2FA Reset Code:').' '.$v_twofa; ?></br></p> |
| 150 | + <p><?php echo _('Please scan the code below in your 2FA application:'); ?></p> |
| 151 | + <div><img class="qr-code" src="<?php echo $v_qrcode; ?>"></div> |
| 152 | + <?php } ?> |
| 153 | + </td> |
| 154 | + </tr> |
| 155 | + </table> |
| 156 | + </td> |
| 157 | + </tr> |
| 158 | + <? if ($_SESSION['userContext'] === 'admin') {?> |
| 159 | + <tr> |
| 160 | + <td> |
| 161 | + <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> |
| 162 | + </td> |
| 163 | + </tr> |
| 164 | + <? } ?> |
| 165 | + <tr> |
| 166 | + <td> |
| 167 | + <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> |
140 | 168 | </td> |
141 | 169 | </tr> |
142 | 170 | <tr> |
143 | 171 | <td> |
144 | | - <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> |
145 | | - <?php if (!empty($v_twofa)) { ?> |
146 | | - <p><?php echo _('2FA Reset Code:').' '.$v_twofa; ?></br></p> |
147 | | - <p><?php echo _('Please scan the code below in your 2FA application:'); ?></p> |
148 | | - <div><img class="qr-code" src="<?php echo $v_qrcode; ?>"></div> |
149 | | - <?php } ?> |
| 172 | + <table id="ip-allowlist" style="<? if ($data[$user]['LOGIN_USE_IPLIST'] === 'yes') { echo 'display: table-cell;'; } else { echo 'display: none;'; } ?>"> |
| 173 | + <tr> |
| 174 | + <td> |
| 175 | + <input type="text" size="20" class="vst-input" name="v_login_allowed_ups" value="<?=htmlentities(trim($v_login_allowed_ips, "'"))?>"> |
| 176 | + <input type="hidden" name="v_login_allowed_ips" value="<?=htmlentities(trim($v_login_allowed_ips, "'"))?>"> |
| 177 | + </td> |
| 178 | + </tr> |
| 179 | + </table> |
150 | 180 | </td> |
151 | 181 | </tr> |
152 | 182 | <tr> |
|
192 | 222 | </tr> |
193 | 223 | <? } ?> |
194 | 224 | <? } ?> |
195 | | - <tr> |
196 | | - <td> |
197 | | - <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> |
198 | | - </td> |
199 | | - </tr> |
200 | 225 | <? if ($_SESSION['POLICY_USER_CHANGE_THEME'] !== 'no') {?> |
201 | 226 | <tr> |
202 | 227 | <td class="vst-text input-label"> |
|
0 commit comments