summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorheper <heper@users.noreply.github.com>2015-10-31 15:33:07 +0100
committerStephen Beaver <sbeaver@netgate.com>2015-11-04 09:15:52 -0500
commite5e898764701af6e2d849d30f2dcbbb5465236b1 (patch)
tree98898ed94c40d97a047c2744dd486cbb01a069c5
parent036c9544fe214b89db0054b1e0001443ab320c34 (diff)
downloadpfsense-e5e898764701af6e2d849d30f2dcbbb5465236b1.zip
pfsense-e5e898764701af6e2d849d30f2dcbbb5465236b1.tar.gz
convert services_dyndns to fa
i've also added a act=toggle. please check to see if there aren't any huge mistakes in it. (seems to work)
-rw-r--r--src/usr/local/www/services_dyndns.php29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/usr/local/www/services_dyndns.php b/src/usr/local/www/services_dyndns.php
index c605241..aefeef5 100644
--- a/src/usr/local/www/services_dyndns.php
+++ b/src/usr/local/www/services_dyndns.php
@@ -59,7 +59,20 @@ if ($_GET['act'] == "del") {
header("Location: services_dyndns.php");
exit;
}
-
+else if ($_GET['act'] == "toggle") {
+ if ($a_dyndns[$_GET['id']]) {
+ if (isset($a_dyndns[$_GET['id']]['enable'])) {
+ unset($a_dyndns[$_GET['id']]['enable']);
+ } else {
+ $a_dyndns[$_GET['id']]['enable'] = true;
+ }
+ write_config();
+ services_dyndns_configure();
+
+ header("Location: services_dyndns.php");
+ exit;
+ }
+}
$pgtitle = array(gettext("Services"), gettext("Dynamic DNS clients"));
include("head.inc");
@@ -168,8 +181,16 @@ foreach ($a_dyndns as $dyndns):
?>
</td>
<td>
- <a href="services_dyndns_edit.php?id=<?=$i?>" class="btn btn-xs btn-info"><?=gettext('Edit')?></a>
- <a href="services_dyndns.php?act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger"><?=gettext("Delete")?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit service')?>" href="services_dyndns_edit.php?id=<?=$i?>"></a>
+ <?php if (isset($dyndns['enable'])) {
+ ?>
+ <a class="fa fa-ban" title="<?=gettext('Disable service')?>" href="?act=toggle&amp;id=<?=$i?>"></a>
+ <?php } else {
+ ?>
+ <a class="fa fa-check-square-o" title="<?=gettext('Enable service')?>" href="?act=toggle&amp;id=<?=$i?>" ></a>
+ <?php }
+ ?>
+ <a class="fa fa-trash" title="<?=gettext('Delete service')?>" href="services_dyndns.php?act=del&amp;id=<?=$i?>" onclick="return confirm('<?=gettext("Are you sure you want to delete this service?")?>')"></a>
</td>
</tr>
<?php
@@ -190,4 +211,4 @@ foreach ($a_dyndns as $dyndns):
print_info_box(gettext("IP addresses appearing in green are up to date with Dynamic DNS provider. " .
"You can force an update for an IP address on the edit page for that service."));
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
OpenPOWER on IntegriCloud