diff options
author | heper <heper@users.noreply.github.com> | 2015-10-31 15:33:07 +0100 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-11-04 09:15:52 -0500 |
commit | e5e898764701af6e2d849d30f2dcbbb5465236b1 (patch) | |
tree | 98898ed94c40d97a047c2744dd486cbb01a069c5 /src/usr/local/www/services_dyndns.php | |
parent | 036c9544fe214b89db0054b1e0001443ab320c34 (diff) | |
download | pfsense-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)
Diffstat (limited to 'src/usr/local/www/services_dyndns.php')
-rw-r--r-- | src/usr/local/www/services_dyndns.php | 29 |
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&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&id=<?=$i?>"></a> + <?php } else { + ?> + <a class="fa fa-check-square-o" title="<?=gettext('Enable service')?>" href="?act=toggle&id=<?=$i?>" ></a> + <?php } + ?> + <a class="fa fa-trash" title="<?=gettext('Delete service')?>" href="services_dyndns.php?act=del&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"); |