From 2e7fa7ca1b996254898ad8137f9299cb67806446 Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 9 Mar 2016 16:25:57 -0500 Subject: Fix some more stragglers for icon/button consistency. Ticket #5965 --- src/usr/local/www/diag_nanobsd.php | 50 ++++++++++++++++------ src/usr/local/www/interfaces.php | 36 ++++++++++------ .../local/www/services_captiveportal_vouchers.php | 2 +- src/usr/local/www/status_captiveportal.php | 10 ++++- src/usr/local/www/system_authservers.php | 6 ++- 5 files changed, 75 insertions(+), 29 deletions(-) (limited to 'src/usr/local') diff --git a/src/usr/local/www/diag_nanobsd.php b/src/usr/local/www/diag_nanobsd.php index 0619837..8bf3c75 100644 --- a/src/usr/local/www/diag_nanobsd.php +++ b/src/usr/local/www/diag_nanobsd.php @@ -154,8 +154,13 @@ $section->addInput(new Form_StaticText( $NANOBSD_SIZE )); -$slicebtn = new Form_Button('bootslice', 'Switch Slice'); -$slicebtn->removeClass('btn-primary')->addClass('btn-default btn-sm'); +$slicebtn = new Form_Button( + 'bootslice', + 'Switch Slice', + null, + 'fa-retweet' +); +$slicebtn->addClass('btn-warning btn-sm'); $section->addInput(new Form_StaticText( 'Bootup slice', @@ -163,8 +168,9 @@ $section->addInput(new Form_StaticText( )); $refcount = refcount_read(1000); +$mounted_rw = is_writable("/"); -if (is_writable("/")) { +if ($mounted_rw) { /* refcount_read returns -1 when shared memory section does not exist */ /* refcount can be zero here when the user has set nanobsd_force_rw */ /* refcount 1 is normal, so only display the count for abnormal values */ @@ -182,9 +188,14 @@ if (is_writable("/")) { // Only show the changero button if force read/write is off, or the file system is not in writable state, or there is an unusual refcount. // If force read/write is on, and the file system is in writable state, and refcount is normal then the user has no reason to mess about. -if (!isset($config['system']['nanobsd_force_rw']) || !is_writable("/") || ($refcount > 1)) { - $robtn = new Form_Button('changero', $btnlbl); - $robtn->removeClass('btn-primary')->addClass('btn-default btn-sm'); +if (!isset($config['system']['nanobsd_force_rw']) || !$mounted_rw || ($refcount > 1)) { + $robtn = new Form_Button( + 'changero', + $btnlbl, + null, + ($mounted_rw) ? 'fa-lock' : 'fa-unlock' + ); + $robtn->addClass(($mounted_rw) ? 'btn-success' : 'btn-warning' . ' btn-sm'); $lbl .= ' ' . $robtn; } @@ -200,8 +211,13 @@ $section->addInput(new Form_Checkbox( isset($config['system']['nanobsd_force_rw']) )); -$permbtn = new Form_Button('setrw', 'Save'); -$permbtn->removeClass('btn-primary')->addClass('btn-default btn-sm'); +$permbtn = new Form_Button( + 'setrw', + 'Save', + null, + 'fa-save' +); +$permbtn->addClass('btn-primary btn-sm'); $section->addInput(new Form_StaticText( null, @@ -215,8 +231,13 @@ $section->addInput(new Form_Input( $COMPLETE_PATH )); -$dupbtn = new Form_Button('duplicateslice', 'Duplicate ' . $COMPLETE_BOOT_PATH . ' -> ' . $TOFLASH); -$dupbtn->removeClass('btn-primary')->addClass('btn-default btn-sm'); +$dupbtn = new Form_Button( + 'duplicateslice', + 'Duplicate ' . $COMPLETE_BOOT_PATH . ' -> ' . $TOFLASH, + null, + 'fa-clone' +); +$dupbtn->addClass('btn-success btn-sm'); $section->addInput(new Form_StaticText( 'Duplicate boot slice', @@ -229,8 +250,13 @@ $section->addInput(new Form_StaticText( )); if (file_exists("/conf/upgrade_log.txt")) { - $viewbtn = new Form_Button('viewupgradelog', 'View log'); - $viewbtn->removeClass('btn-primary')->addClass('btn-default btn-sm'); + $viewbtn = new Form_Button( + 'viewupgradelog', + 'View log', + null, + 'fa-file-text-o' + ); + $viewbtn->addClass('btn-primary btn-sm'); $section->addInput(new Form_StaticText( 'View previous upgrade log', diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php index c07e398..8c6f563 100644 --- a/src/usr/local/www/interfaces.php +++ b/src/usr/local/www/interfaces.php @@ -1817,8 +1817,10 @@ $group->add(new Form_Select( $group->add(new Form_Button( 'addgw', - 'Add a new gateway' -))->removeClass('btn-primary')->setAttribute('data-target', '#newgateway')->setAttribute('data-toggle', 'modal'); + 'Add a new gateway', + null, + 'fa-plus' +))->addClass('btn-success')->setAttribute('data-target', '#newgateway')->setAttribute('data-toggle', 'modal'); $group->setHelp('If this interface is an Internet connection, select an existing Gateway from the list or add a new one using the "Add" button.' . '
' . 'On local LANs the upstream gateway should be "none".' . @@ -1848,8 +1850,10 @@ $group->add(new Form_Select( $group->add(new Form_Button( 'addgw6', - 'Add a new gateway' -))->removeClass('btn-primary')->setAttribute('data-target', '#newgateway6')->setAttribute('data-toggle', 'modal'); + 'Add a new gateway', + null, + 'fa-plus' +))->addClass('btn-success')->setAttribute('data-target', '#newgateway6')->setAttribute('data-toggle', 'modal'); $group->setHelp('If this interface is an Internet connection, select an existing Gateway from the list or add a new one using the "Add" button.' . '
' . 'On local LANs the upstream gateway should be "none". '); @@ -1888,17 +1892,21 @@ $modal->addInput(new Form_Input( $btnaddgw6 = new Form_Button( 'add6', - 'Add' + 'Add', + null, + 'fa-plus' ); -$btnaddgw6->removeClass('btn-primary')->addClass('btn-success'); +$btnaddgw6->addClass('btn-success'); $btncnxgw6 = new Form_Button( 'cnx6', - 'Cancel' + 'Cancel', + null, + 'fa-undo' ); -$btncnxgw6->removeClass('btn-primary')->addClass('btn-default'); +$btncnxgw6->addClass('btn-warning'); $modal->addInput(new Form_StaticText( null, @@ -3200,17 +3208,21 @@ $modal->addInput(new Form_Input( $btnaddgw = new Form_Button( 'add', - 'Add' + 'Add', + null, + 'fa-plus' ); -$btnaddgw->removeClass('btn-primary')->addClass('btn-success'); +$btnaddgw->addClass('btn-success'); $btncnxgw = new Form_Button( 'cnx', - 'Cancel' + 'Cancel', + null, + 'fa-undo' ); -$btncnxgw->removeClass('btn-primary')->addClass('btn-default'); +$btncnxgw->addClass('btn-warning'); $modal->addInput(new Form_StaticText( null, diff --git a/src/usr/local/www/services_captiveportal_vouchers.php b/src/usr/local/www/services_captiveportal_vouchers.php index 6f8ff5a..57eb862 100644 --- a/src/usr/local/www/services_captiveportal_vouchers.php +++ b/src/usr/local/www/services_captiveportal_vouchers.php @@ -674,7 +674,7 @@ events.push(function() { // Set initial state setShowHide($('#enable').is(":checked")); - var generateButton = $(''); + var generateButton = $(''); generateButton.on('click', function() { $.ajax({ type: 'get', diff --git a/src/usr/local/www/status_captiveportal.php b/src/usr/local/www/status_captiveportal.php index 905847e..79d8ed0 100644 --- a/src/usr/local/www/status_captiveportal.php +++ b/src/usr/local/www/status_captiveportal.php @@ -274,12 +274,18 @@ endif; if (!empty($cpzone)): if ($_GET['showact']): ?> - " /> + - " /> + diff --git a/src/usr/local/www/system_authservers.php b/src/usr/local/www/system_authservers.php index 9f113b0..7665455 100644 --- a/src/usr/local/www/system_authservers.php +++ b/src/usr/local/www/system_authservers.php @@ -571,8 +571,10 @@ $group->add(new Form_Input( $group->add(new Form_Button( 'Select', - 'Select a container' -))->removeClass('btn-primary')->addClass('btn-default'); + 'Select a container', + null, + 'fa-search' +))->addClass('btn-info'); $section->add($group); -- cgit v1.1