summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@world.inf.org>2013-02-01 13:04:33 +0545
committerPhil Davis <phil.davis@world.inf.org>2013-02-01 13:04:33 +0545
commitb328217211d0fc34097c355b10389493631691ef (patch)
treeb68abfc726532abfbb6e648a16424828695d73ae
parente27953e73a41c644717708c1e7ace02800c7fc4b (diff)
downloadpfsense-b328217211d0fc34097c355b10389493631691ef.zip
pfsense-b328217211d0fc34097c355b10389493631691ef.tar.gz
Display only needed Reinstall and Clear Package Lock buttons
Make the code a bit smarter, so the user only sees whichever of the reinstall and clear package lock buttons that are actually relevant.
-rwxr-xr-xusr/local/www/diag_backup.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php
index 5bc538e..e869fec 100755
--- a/usr/local/www/diag_backup.php
+++ b/usr/local/www/diag_backup.php
@@ -736,7 +736,7 @@ function backuparea_change(obj) {
<p><strong><span class="red"><?=gettext("Note:"); ?></span></strong><br /><?=gettext("The firewall will reboot after restoring the configuration."); ?><br /></p>
</td>
</tr>
- <?php if(($config['installedpackages']['package'] != "") || (is_subsystem_dirty("packagelock"))) { ?>
+ <?php if (($config['installedpackages']['package'] != "") || (is_subsystem_dirty("packagelock"))) { ?>
<tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
@@ -746,12 +746,16 @@ function backuparea_change(obj) {
<tr>
<td width="22%" valign="baseline" class="vncell">&nbsp;</td>
<td width="78%" class="vtable">
- <p><?=gettext("Click this button to reinstall all system packages. This may take a while."); ?> <br /><br />
- <input name="Submit" type="submit" class="formbtn" id="reinstallpackages" value="<?=gettext("Reinstall packages"); ?>">
- <br/>
- <br/>
- <p><?=gettext("Click this button to clear the package lock if a package fails to reinstall properly after an upgrade."); ?> <br /><br />
- <input name="Submit" type="submit" class="formbtn" id="clearpackagelock" value="<?=gettext("Clear Package Lock"); ?>">
+ <?php if ($config['installedpackages']['package'] != "") { ?>
+ <p><?=gettext("Click this button to reinstall all system packages. This may take a while."); ?> <br /><br />
+ <input name="Submit" type="submit" class="formbtn" id="reinstallpackages" value="<?=gettext("Reinstall packages"); ?>">
+ <br/>
+ <br/>
+ <?php } ?>
+ <?php if (is_subsystem_dirty("packagelock")) { ?>
+ <p><?=gettext("Click this button to clear the package lock if a package fails to reinstall properly after an upgrade."); ?> <br /><br />
+ <input name="Submit" type="submit" class="formbtn" id="clearpackagelock" value="<?=gettext("Clear Package Lock"); ?>">
+ <?php } ?>
</td>
</tr>
<?php } ?>
OpenPOWER on IntegriCloud