180 |
180 |
$pconfig['radmac_format'] = $a_cp[$cpzone]['radmac_format'];
|
181 |
181 |
$pconfig['reverseacct'] = isset($a_cp[$cpzone]['reverseacct']);
|
182 |
182 |
$pconfig['includeidletime'] = isset($a_cp[$cpzone]['includeidletime']);
|
|
183 |
$pconfig['radiusnasid'] = $a_cp[$cpzone]['radiusnasid'];
|
183 |
184 |
$pconfig['page'] = array();
|
184 |
185 |
if ($a_cp[$cpzone]['page']['htmltext']) {
|
185 |
186 |
$pconfig['page']['htmltext'] = $a_cp[$cpzone]['page']['htmltext'];
|
... | ... | |
312 |
313 |
if (isset($_POST['radacct_enable']) && !in_array($_POST['reauthenticateacct'], array('none', 'stopstart', 'stopstartfreeradius', 'interimupdate'))) {
|
313 |
314 |
$input_errors[] = gettext("You need to select an option for Accounting Updates !");
|
314 |
315 |
}
|
|
316 |
if (trim($_POST['radiusnasid']) !== "" && !preg_match("/^[\x21-\x7e]{3,253}$/i", trim($_POST['radiusnasid']))) {
|
|
317 |
$input_errors[] = gettext("The NAS-Identifier must be 3-253 characters long and should only contain ASCII characters.");
|
|
318 |
}
|
315 |
319 |
|
316 |
320 |
if (!$input_errors) {
|
317 |
321 |
$newcp =& $a_cp[$cpzone];
|
... | ... | |
390 |
394 |
$newcp['radmac_format'] = $_POST['radmac_format'] ? $_POST['radmac_format'] : false;
|
391 |
395 |
$newcp['reverseacct'] = $_POST['reverseacct'] ? true : false;
|
392 |
396 |
$newcp['includeidletime'] = $_POST['includeidletime'] ? true : false;
|
|
397 |
$newcp['radiusnasid'] = trim($_POST['radiusnasid']);
|
393 |
398 |
if ($_POST['customhtml']) {
|
394 |
399 |
$newcp['customhtml'] = true;
|
395 |
400 |
} else {
|
... | ... | |
916 |
921 |
"This setting is useful if you want to provide multiple authentication method to your users. If you don't need multiple authentication method, then leave this setting empty.");
|
917 |
922 |
$section->add($group);
|
918 |
923 |
|
|
924 |
$section->addInput(new Form_Input(
|
|
925 |
'radiusnasid',
|
|
926 |
'NAS Identifier',
|
|
927 |
'text',
|
|
928 |
$pconfig['radiusnasid']
|
|
929 |
))->setHelp('Specify a NAS identifier to override the default value (CaptivePortal-%s)', $cpzone);
|
|
930 |
|
919 |
931 |
$section->addInput(new Form_Checkbox(
|
920 |
932 |
'reauthenticate',
|
921 |
933 |
'Reauthenticate Users',
|
... | ... | |
1141 |
1153 |
hideInput('radmac_format', hide);
|
1142 |
1154 |
hideCheckbox('radiusperuserbw', hide);
|
1143 |
1155 |
hideCheckbox('radiustraffic_quota', hide);
|
|
1156 |
hideInput('radiusnasid', hide);
|
1144 |
1157 |
}
|
1145 |
1158 |
|
1146 |
1159 |
function hideHTTPS() {
|
Restore the RADIUS NAS ID option to Captive Portal. Fixes #8998
Keeps the default of using CaptivePortal-<zonename> when not set,
otherwise uses the value supplied by the user as with older versions.
(cherry picked from commit b1cc8f3143f7253bb3acdcdf8c18f9effaf3bce5)