summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/services_unbound_host_edit.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-12-14 09:25:22 -0500
committerStephen Beaver <sbeaver@netgate.com>2015-12-14 09:25:41 -0500
commit9f6a9f24edf12d961c0318d95b02d969447e2d3d (patch)
tree4c583c54300a1ac4e69ed75fe76df595f09fed2d /src/usr/local/www/services_unbound_host_edit.php
parentcd3f4b916c252980a257f5be1a0cf2688c078549 (diff)
downloadpfsense-9f6a9f24edf12d961c0318d95b02d969447e2d3d.zip
pfsense-9f6a9f24edf12d961c0318d95b02d969447e2d3d.tar.gz
Fixed #5638
Diffstat (limited to 'src/usr/local/www/services_unbound_host_edit.php')
-rw-r--r--src/usr/local/www/services_unbound_host_edit.php31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/usr/local/www/services_unbound_host_edit.php b/src/usr/local/www/services_unbound_host_edit.php
index 29ebc3c..7a4d696 100644
--- a/src/usr/local/www/services_unbound_host_edit.php
+++ b/src/usr/local/www/services_unbound_host_edit.php
@@ -282,12 +282,17 @@ $form->add($section);
$section = new Form_Section('Additional names for this host');
+if(!$pconfig['aliases']['item']) {
+ $pconfig['aliases']['item'] = array('host' => "");
+}
+
if( $pconfig['aliases']['item']) {
$counter = 0;
$last = count($pconfig['aliases']['item']) - 1;
foreach($pconfig['aliases']['item'] as $item) {
$group = new Form_Group(null);
+ $group->addClass('repeatable');
$group->add(new Form_Input(
'aliashost' . $counter,
@@ -310,28 +315,22 @@ if( $pconfig['aliases']['item']) {
$item['description']
))->setHelp($counter == $last ? 'Description':null);
- $btn = new Form_Button(
- 'btn' . $counter,
- 'Delete',
- 'services_unbound_host_edit.php?act=delopt' . '&id=' . $counter
- );
+ $group->add(new Form_Button(
+ 'deleterow' . $counter,
+ 'Delete'
+ ))->removeClass('btn-primary')->addClass('btn-warning');
- $btn->removeClass('btn-primary')->addClass('btn-danger btn-sm');
- $group->add($btn);
$section->add($group);
$counter++;
}
}
-$btnaddopt = new Form_Button(
- 'btnaddopt',
- 'Add Host name',
- 'services_unbound_host_edit.php?act=addopt'
-);
-
-$btnaddopt->removeClass('btn-primary')->addClass('btn-success btn-sm');
-
-$section->addInput($btnaddopt);
+$form->addGlobal(new Form_Button(
+ 'addrow',
+ 'Add host name',
+ null,
+ 'fa-plus'
+))->removeClass('btn-primary')->addClass('btn-success addbtn');
$form->add($section);
print($form);
OpenPOWER on IntegriCloud