Revision f137d9cd
Added by Christian McDonald about 2 years ago
src/usr/local/www/services_dhcp.php | ||
---|---|---|
984 | 984 |
exit; |
985 | 985 |
} |
986 | 986 |
|
987 |
$dhcrelay_enabled = config_path_enabled('dhcrelay'); |
|
988 |
if ($dhcrelay_enabled) { |
|
989 |
print_info_box(gettext('DHCP Relay is currently enabled. DHCP Server cannot be enabled while the DHCP Relay is enabled on any interface.'), 'danger', false); |
|
990 |
} |
|
991 |
|
|
992 | 987 |
display_top_tabs($tab_array); |
993 | 988 |
|
994 | 989 |
$form = new Form(); |
995 | 990 |
|
996 | 991 |
$section = new Form_Section('General Options'); |
997 | 992 |
|
998 |
if (!is_numeric($pool) && !($act === 'newpool')) { |
|
999 |
$input = new Form_Checkbox( |
|
1000 |
'enable', |
|
1001 |
gettext('Enable'), |
|
1002 |
sprintf(gettext('Enable DHCP Server on %s interface'), htmlspecialchars($iflist[$if])), |
|
1003 |
(!$dhcrelay_enabled ? $pconfig['enable'] : false) |
|
1004 |
); |
|
1005 |
if ($dhcrelay_enabled) { |
|
1006 |
$input->setAttribute('disabled', true); |
|
993 |
if (!is_numeric($pool) && !($act == "newpool")) { |
|
994 |
if (config_path_enabled('dhcrelay')) { |
|
995 |
$section->addInput(new Form_Checkbox( |
|
996 |
'enable', |
|
997 |
'Enable', |
|
998 |
gettext("DHCP Relay is currently enabled. DHCP Server canot be enabled while the DHCP Relay is enabled on any interface."), |
|
999 |
$pconfig['enable'] |
|
1000 |
))->setAttribute('disabled', true); |
|
1001 |
} else { |
|
1002 |
$section->addInput(new Form_Checkbox( |
|
1003 |
'enable', |
|
1004 |
'Enable', |
|
1005 |
sprintf(gettext("Enable DHCP server on %s interface"), htmlspecialchars($iflist[$if])), |
|
1006 |
$pconfig['enable'] |
|
1007 |
)); |
|
1007 | 1008 |
} |
1008 |
$section->addInput($input); |
|
1009 | 1009 |
} else { |
1010 | 1010 |
print_info_box(gettext('Editing pool-specific options. To return to the Interface, click its tab above.'), 'info', false); |
1011 | 1011 |
} |
Also available in: Unified diff
Revert "services_dhcp.php: cleanup warning notice when DHCP relay is enabled"
This reverts commit 564905382d696ef80b45e7552f4fdc502a7d2053.