Revision 67877234
Added by Phil Davis about 10 years ago
usr/local/www/interfaces.php | ||
---|---|---|
114 | 114 |
$pconfig['ptpid'] = $a_ppps[$pppid]['ptpid']; |
115 | 115 |
$pconfig['port'] = $a_ppps[$pppid]['ports']; |
116 | 116 |
if ($a_ppps[$pppid]['type'] == "ppp") { |
117 |
$pconfig['username'] = $a_ppps[$pppid]['username']; |
|
118 |
$pconfig['password'] = base64_decode($a_ppps[$pppid]['password']); |
|
117 |
$pconfig['ppp_username'] = $a_ppps[$pppid]['username'];
|
|
118 |
$pconfig['ppp_password'] = base64_decode($a_ppps[$pppid]['password']);
|
|
119 | 119 |
|
120 | 120 |
$pconfig['phone'] = $a_ppps[$pppid]['phone']; |
121 | 121 |
$pconfig['apn'] = $a_ppps[$pppid]['apn']; |
... | ... | |
982 | 982 |
$a_ppps[$pppid]['type'] = $_POST['type']; |
983 | 983 |
$a_ppps[$pppid]['if'] = $_POST['type'].$_POST['ptpid']; |
984 | 984 |
$a_ppps[$pppid]['ports'] = $_POST['port']; |
985 |
$a_ppps[$pppid]['username'] = $_POST['username']; |
|
986 |
$a_ppps[$pppid]['password'] = base64_encode($_POST['password']); |
|
985 |
$a_ppps[$pppid]['username'] = $_POST['ppp_username'];
|
|
986 |
$a_ppps[$pppid]['password'] = base64_encode($_POST['ppp_password']);
|
|
987 | 987 |
$a_ppps[$pppid]['phone'] = $_POST['phone']; |
988 | 988 |
$a_ppps[$pppid]['apn'] = $_POST['apn']; |
989 | 989 |
$wancfg['if'] = $_POST['type'] . $_POST['ptpid']; |
... | ... | |
1597 | 1597 |
success: function(data,textStatus,response) { |
1598 | 1598 |
var xmldoc = response.responseXML; |
1599 | 1599 |
var provider = xmldoc.getElementsByTagName('connection')[0]; |
1600 |
jQuery('#username').val(''); |
|
1601 |
jQuery('#password').val(''); |
|
1600 |
jQuery('#ppp_username').val('');
|
|
1601 |
jQuery('#ppp_password').val('');
|
|
1602 | 1602 |
if(provider.getElementsByTagName('apn')[0].firstChild.data == "CDMA") { |
1603 | 1603 |
jQuery('#phone').val('#777'); |
1604 | 1604 |
jQuery('#apn').val(''); |
... | ... | |
1606 | 1606 |
jQuery('#phone').val('*99#'); |
1607 | 1607 |
jQuery('#apn').val(provider.getElementsByTagName('apn')[0].firstChild.data); |
1608 | 1608 |
} |
1609 |
username = provider.getElementsByTagName('username')[0].firstChild.data;
|
|
1610 |
password = provider.getElementsByTagName('password')[0].firstChild.data;
|
|
1611 |
jQuery('#username').val(username);
|
|
1612 |
jQuery('#password').val(password);
|
|
1609 |
ppp_username = provider.getElementsByTagName('ppp_username')[0].firstChild.data;
|
|
1610 |
ppp_password = provider.getElementsByTagName('ppp_password')[0].firstChild.data;
|
|
1611 |
jQuery('#ppp_username').val(ppp_username);
|
|
1612 |
jQuery('#ppp_password').val(ppp_password);
|
|
1613 | 1613 |
} |
1614 | 1614 |
}); |
1615 | 1615 |
} |
... | ... | |
2615 | 2615 |
<tr> |
2616 | 2616 |
<td width="22%" valign="top" class="vncell"><?=gettext("Username"); ?></td> |
2617 | 2617 |
<td width="78%" class="vtable"> |
2618 |
<input name="username" type="text" class="formfld user" id="username" size="20" value="<?=htmlspecialchars($pconfig['username']);?>" />
|
|
2618 |
<input name="ppp_username" type="text" class="formfld user" id="ppp_username" size="20" value="<?=htmlspecialchars($pconfig['ppp_username']);?>" />
|
|
2619 | 2619 |
</td> |
2620 | 2620 |
</tr> |
2621 | 2621 |
<tr> |
2622 | 2622 |
<td width="22%" valign="top" class="vncell"><?=gettext("Password"); ?></td> |
2623 | 2623 |
<td width="78%" class="vtable"> |
2624 |
<input name="password" type="password" class="formfld pwd" id="password" size="20" value="<?=htmlspecialchars($pconfig['password']);?>" />
|
|
2624 |
<input name="ppp_password" type="password" class="formfld pwd" id="ppp_password" size="20" value="<?=htmlspecialchars($pconfig['ppp_password']);?>" />
|
|
2625 | 2625 |
</td> |
2626 | 2626 |
</tr> |
2627 | 2627 |
<tr id="phone_num"> |
Also available in: Unified diff
Fix password box cursor position
Similar to
https://github.com/pfsense/pfsense/commit/dedc40f7ded5f88aee4720aa8a3a57667b975254
The password field shows the little lock icon, but the text input area
starts over the top of the icon and as I type in the field the password
"dots" go over the lock icon in each of these data entry places.
Changing the field name/id to not be "password" but to be "passwordfld",
"passwordfld1" "passwordfld2" and the like fixes it. Something does not
like the field being called just "password".
In interfaces.php I also changed the field "username" to be
"ppp_username". This standardized it to work in a similar way to
pppoe_username pptp_username fields. It looks easier to understand for
me.