Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add icons to buttons on Diag > Backup & Restore
diff --git a/src/usr/local/www/diag_backup.php b/src/usr/local/www/diag_backup.php
index d499442..5b49019 100644
--- a/src/usr/local/www/diag_backup.php
+++ b/src/usr/local/www/diag_backup.php
@@ -664,8 +664,10 @@ $group = new Form_Group('');
// Note: ID attribute of each element created is to be unique. Not being used, suppressing it.
$group->add(new Form_Button(
'Submit',
- 'Download configuration as XML'
-))->setAttribute('id');
+ 'Download configuration as XML',
+ null,
+ 'fa-download'
+))->setAttribute('id')->addClass('btn-primary');
$section->add($group);
$form->add($section);
@@ -710,8 +712,10 @@ $group = new Form_Group('');
// Note: ID attribute of each element created is to be unique. Not being used, suppressing it.
$group->add(new Form_Button(
'Submit',
- 'Restore Configuration'
-))->setHelp('The firewall will reboot after restoring the configuration.')->removeClass('btn-primary')->addClass('btn-danger restore')->setAttribute('id');
+ 'Restore Configuration',
+ null,
+ 'fa-undo'
+))->setHelp('The firewall will reboot after restoring the configuration.')->addClass('btn-danger restore')->setAttribute('id');
$section->add($group);
@@ -725,8 +729,10 @@ if (($config['installedpackages']['package'] != "") || (is_subsystem_dirty("pack
// Note: ID attribute of each element created is to be unique. Not being used, suppressing it.
$group->add(new Form_Button(
'Submit',
- 'Reinstall Packages'
- ))->setHelp('Click this button to reinstall all system packages. This may take a while.')->removeClass('btn-primary')->addClass('btn-success')->setAttribute('id');
+ 'Reinstall Packages',
+ null,
+ 'fa-retweet'
+ ))->setHelp('Click this button to reinstall all system packages. This may take a while.')->addClass('btn-success')->setAttribute('id');
$section->add($group);
}
@@ -736,8 +742,10 @@ if (($config['installedpackages']['package'] != "") || (is_subsystem_dirty("pack
// Note: ID attribute of each element created is to be unique. Not being used, suppressing it.
$group->add(new Form_Button(
'Submit',
- 'Clear Package Lock'
- ))->setHelp('Click this button to clear the package lock if a package fails to reinstall properly after an upgrade.')->removeClass('btn-primary')->addClass('btn-warning')->setAttribute('id');
+ 'Clear Package Lock',
+ null,
+ 'fa-wrench'
+ ))->setHelp('Click this button to clear the package lock if a package fails to reinstall properly after an upgrade.')->addClass('btn-warning')->setAttribute('id');
$section->add($group);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.