summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/services_rfc2136.php
diff options
context:
space:
mode:
authorheper <heper@users.noreply.github.com>2015-10-31 16:00:49 +0100
committerStephen Beaver <sbeaver@netgate.com>2015-11-04 09:15:52 -0500
commitc5d81fdf69f80ff35679fa84e021f9f620764be1 (patch)
tree3dfa0e5205be377ccc93d1fad0a1a6ea8b829a3b /src/usr/local/www/services_rfc2136.php
parente5e898764701af6e2d849d30f2dcbbb5465236b1 (diff)
downloadpfsense-c5d81fdf69f80ff35679fa84e021f9f620764be1.zip
pfsense-c5d81fdf69f80ff35679fa84e021f9f620764be1.tar.gz
convert services_rfc2136 to fa
please double check the added act==toggle code
Diffstat (limited to 'src/usr/local/www/services_rfc2136.php')
-rw-r--r--src/usr/local/www/services_rfc2136.php29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/usr/local/www/services_rfc2136.php b/src/usr/local/www/services_rfc2136.php
index a73880a..5eef2a0 100644
--- a/src/usr/local/www/services_rfc2136.php
+++ b/src/usr/local/www/services_rfc2136.php
@@ -55,6 +55,19 @@ if ($_GET['act'] == "del") {
header("Location: services_rfc2136.php");
exit;
}
+else if ($_GET['act'] == "toggle") {
+ if ($a_rfc2136[$_GET['id']]) {
+ if (isset($a_rfc2136[$_GET['id']]['enable'])) {
+ unset($a_rfc2136[$_GET['id']]['enable']);
+ } else {
+ $a_rfc2136[$_GET['id']]['enable'] = true;
+ }
+ write_config();
+
+ header("Location: services_rfc2136.php");
+ exit;
+ }
+}
$pgtitle = array(gettext("Services"), gettext("RFC 2136 clients"));
include("head.inc");
@@ -157,9 +170,17 @@ foreach ($a_rfc2136 as $rfc2136):
<?=htmlspecialchars($rfc2136['descr'])?>
</td>
<td>
- <a href="services_rfc2136_edit.php?id=<?=$i?>" class="btn btn-xs btn-info"><?=gettext('Edit')?></a>
- <a href="services_rfc2136.php?act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger"><?=gettext("Delete")?></a>
- </td>
+ <a class="fa fa-pencil" title="<?=gettext('Edit client')?>" href="services_rfc2136_edit.php?id=<?=$i?>"></a>
+ <?php if (isset($rfc2136['enable'])) {
+ ?>
+ <a class="fa fa-ban" title="<?=gettext('Disable client')?>" href="?act=toggle&amp;id=<?=$i?>"></a>
+ <?php } else {
+ ?>
+ <a class="fa fa-check-square-o" title="<?=gettext('Enable client')?>" href="?act=toggle&amp;id=<?=$i?>" ></a>
+ <?php }
+ ?>
+ <a class="fa fa-trash" title="<?=gettext('Delete client')?>" href="services_rfc2136.php?act=del&amp;id=<?=$i?>" onclick="return confirm('<?=gettext("Are you sure you want to delete this client?")?>')"></a>
+ </td>
</tr>
<?php
$i++;
@@ -175,4 +196,4 @@ endforeach; ?>
</nav>
<?php
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
OpenPOWER on IntegriCloud