Skip to content

Commit ad9f027

Browse files
author
Kristan Kenney
committed
Adjust check and add placeholder text
1 parent 270cc5f commit ad9f027

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

web/edit/user/index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@
193193

194194
// Change use IP allow list option (admin only)
195195
if (($v_login_use_iplist != $_POST['v_login_use_iplist']) && (empty($_SESSION['error_msg']))) {
196+
if ($_POST['v_login_use_iplist'] == 'on') { $_POST['v_login_use_iplist'] = 'yes'; } else { $_POST['v_login_use_iplist'] = 'no'; }
196197
$v_login_use_iplist = escapeshellarg($_POST['v_login_use_iplist']);
197198
exec (HESTIA_CMD."v-change-user-config-value ".escapeshellarg($v_username)." LOGIN_USE_IPLIST ".$v_login_use_iplist, $output, $return_var);
198199
check_return_code($return_var,$output);

web/templates/pages/edit_user.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
<table id="ip-allowlist" style="<? if ($data[$user]['LOGIN_USE_IPLIST'] === 'yes') { echo 'display: table-cell;'; } else { echo 'display: none;'; } ?>">
173173
<tr>
174174
<td>
175-
<input type="text" size="20" class="vst-input" name="v_login_allowed_ips" value="<?=htmlentities(trim($v_login_allowed_ips, "'"))?>">
175+
<input type="text" size="20" class="vst-input" placeholder="<?=_('Example: 127.0.0.1,192.168.1.100');?>" name="v_login_allowed_ips" value="<?=htmlentities(trim($v_login_allowed_ips, "'"))?>">
176176
<input type="hidden" name="v_login_allowed_ips" value="<?=htmlentities(trim($v_login_allowed_ips, "'"))?>">
177177
</td>
178178
</tr>

0 commit comments

Comments
 (0)