From 3d968291f9108b17b38d8b7ce67ea2cdb2a950a8 Mon Sep 17 00:00:00 2001 From: Bruce Bannon Date: Wed, 1 Nov 2023 18:25:11 -0600 Subject: [PATCH] Most input -> button convertion --- access.php | 30 +++++++++++++--------- admin.php | 15 +++++------ approve_entry.php | 8 +++--- assistant_edit.php | 7 +++--- category.php | 27 ++++++++++---------- catsel.php | 16 ++++++------ docadd.php | 4 +-- edit_entry.php | 56 ++++++++++++++++++++++++------------------ edit_entry_handler.php | 8 +++--- edit_report.php | 16 ++++++------ edit_template.php | 13 +++++----- export.php | 4 +-- groups.php | 25 ++++++++++++++----- help_bug.php | 2 +- import.php | 3 ++- includes/dbtable.php | 4 +-- layers.php | 31 ++++++++++++++--------- login-app.php | 4 +-- login.php | 3 ++- pref.php | 21 ++++++++++------ purge.php | 13 +++++----- register.php | 10 ++++---- reject_entry.php | 4 +-- remotecal_mgmt.php | 26 ++++++++++++++------ resourcecal_mgmt.php | 17 +++++++++---- search.php | 9 ++++--- search_handler.php | 4 +-- select_user.php | 3 ++- set_entry_cat.php | 4 +-- user_mgmt.php | 27 ++++++++++++++------ usersel.php | 26 ++++++++++---------- view_entry.php | 10 ++++---- views_edit.php | 11 ++++++--- 33 files changed, 272 insertions(+), 189 deletions(-) diff --git a/access.php b/access.php index a892f12f2..193e4e5cf 100644 --- a/access.php +++ b/access.php @@ -35,7 +35,8 @@ $defConfigStr = translate( 'DEFAULT CONFIGURATION' ); $goStr = ' - + '; $saveStr = translate( 'Save' ); $undoStr = translate( 'Undo' ); @@ -262,8 +263,9 @@ - - + + '; $pagetitle = translate( 'Allow Access to Other Users Calendar' ); @@ -415,13 +417,15 @@ echo ' ' - . ( $otheruser != '__default__' && $otheruser != '__public__' ? ' -   ' : '' ) . ' -    - + . ( $otheruser !== '__default__' && $otheruser !== '__public__' ? ' + ' + : '' ) . ' + + @@ -438,8 +442,10 @@ echo ' diff --git a/admin.php b/admin.php index 4419188c5..eadb8bba5 100644 --- a/admin.php +++ b/admin.php @@ -110,10 +110,10 @@ function save_pref ( $prefs, $src ) { @session_start(); $_SESSION['webcal_tmp_login'] = 'blahblahblah'; - $editStr = ''; + $editStr = ''; $choices = ['day.php', 'week.php', 'month.php', 'year.php']; $choices_text = [translate ( 'Day' ), translate ( 'Week' ), translate ( 'Month' ), translate ( 'Year' )]; @@ -243,8 +243,8 @@ function save_pref ( $prefs, $src ) { ' . csrf_form_key() . display_admin_link() . ' -

+

' . $tabs . ' @@ -854,7 +854,8 @@ function save_pref ( $prefs, $src ) {
- +
diff --git a/approve_entry.php b/approve_entry.php index edb22bdfc..01063da74 100644 --- a/approve_entry.php +++ b/approve_entry.php @@ -31,10 +31,10 @@ diff --git a/assistant_edit.php b/assistant_edit.php index a1f659aca..cabfd71c3 100644 --- a/assistant_edit.php +++ b/assistant_edit.php @@ -57,14 +57,15 @@ echo "\n"; if ( $GROUPS_ENABLED == 'Y' ) { - echo ''; + echo ''; } echo "\n"; ?>
- +
diff --git a/category.php b/category.php index d11f106d2..435d687d1 100644 --- a/category.php +++ b/category.php @@ -96,7 +96,7 @@
@@ -106,19 +106,19 @@
    - -
' : '') // end test of ENABLE_ICON_UPLOADS - . '
- ' + +
' : '' ) . ' +
+ ' . 'Cancel ' . (!empty($id) ? ' - ' : '') . ' + ' : '' ) . '
'; } else @@ -171,7 +171,8 @@
diff --git a/catsel.php b/catsel.php index 9a2a64eab..64c68c9df 100644 --- a/catsel.php +++ b/catsel.php @@ -59,8 +59,8 @@ } echo ' - + - + . '    +
- - + +
-     - +     +
- +
*' . translate ( 'Global Category' ) - . '     
diff --git a/docadd.php b/docadd.php index 28a2c4d8f..7a2db359c 100644 --- a/docadd.php +++ b/docadd.php @@ -216,7 +216,7 @@ : - + @@ -236,7 +236,7 @@ - + diff --git a/edit_entry.php b/edit_entry.php index da9bac12d..bd27440f3 100644 --- a/edit_entry.php +++ b/edit_entry.php @@ -1016,7 +1016,8 @@ function time_selection($prefix, $time = '', $trigger = false) - + @@ -1026,7 +1027,8 @@ function time_selection($prefix, $time = '', $trigger = false) - + @@ -1037,7 +1039,8 @@ function time_selection($prefix, $time = '', $trigger = false) - + @@ -1052,8 +1055,10 @@ function time_selection($prefix, $time = '', $trigger = false) - - + + @@ -1067,9 +1072,7 @@ function time_selection($prefix, $time = '', $trigger = false) - - - @@ -1237,9 +1240,9 @@ function time_selection($prefix, $time = '', $trigger = false) . translate($byday_names[$rpt_byday_mod]) : ' ')); echo ' - '; + "; } echo ' '; @@ -1311,9 +1314,9 @@ function time_selection($prefix, $time = '', $trigger = false) ' : '') . ($loop_ctr == 31 ? ' ' : '') . ' - ' + " . ($loop_ctr % 10 == 0 ? ' ' : ''); @@ -1357,9 +1360,10 @@ function time_selection($prefix, $time = '', $trigger = false) . '' : '') . ($loop_ctr == 31 ? ' ' : '') . ' - ' + " . ($loop_ctr % 10 == 0 ? ' ' : ''); @@ -1420,12 +1424,15 @@ function time_selection($prefix, $time = '', $trigger = false) -
-
- +
+
+ @@ -1592,7 +1599,8 @@ function time_selection($prefix, $time = '', $trigger = false) ?>
- + 0 && ($login == $create_by || $single_user == 'Y' || $is_admin)) { ?>
diff --git a/edit_entry_handler.php b/edit_entry_handler.php index c2123fe1c..d0eae6339 100644 --- a/edit_entry_handler.php +++ b/edit_entry_handler.php @@ -1290,10 +1290,10 @@ function sort_byday( $a, $b ) { echo // Allow them to override a conflict if server settings allow it. ( ! empty( $ALLOW_CONFLICT_OVERRIDE ) && $ALLOW_CONFLICT_OVERRIDE == 'Y' ? ' - ' : '' ) . ' - + ' : '' ) . ' + '; } else diff --git a/edit_report.php b/edit_report.php index bf3ac87c6..c01e91d79 100644 --- a/edit_report.php +++ b/edit_report.php @@ -325,13 +325,15 @@ function print_options ( $textarea, $option ) { //} echo '
- ' - . ( $adding_report ? '' : ' - ' . translate('Cancel') . ' - ' ); + ' + . ( $adding_report ? '' : ' + ' + . translate ( 'Cancel' ) . ' + ' ); ?>
diff --git a/edit_template.php b/edit_template.php index b542642ec..eef7631ab 100644 --- a/edit_template.php +++ b/edit_template.php @@ -131,14 +131,13 @@ ' : '' ) . '
- - ' + + ' . ( ! empty ( $user ) ? ' - ' - : '' ) . ' + ' : '' ) . ' ' ) . "\n" . print_trailer ( false, true, true ); ?> diff --git a/export.php b/export.php index c4748f620..8d50698d2 100644 --- a/export.php +++ b/export.php @@ -106,8 +106,8 @@ - + '; diff --git a/groups.php b/groups.php index e7a96da86..a480fabfd 100644 --- a/groups.php +++ b/groups.php @@ -41,7 +41,8 @@ @@ -61,7 +62,9 @@
- +
@@ -111,8 +114,13 @@
@@ -142,8 +150,13 @@
diff --git a/help_bug.php b/help_bug.php index 65c45e9e5..79383c12d 100644 --- a/help_bug.php +++ b/help_bug.php @@ -18,7 +18,7 @@ . str_replace ('XXX', translate ( get_browser_language ( true ) ), translate ( 'Also, please use English rather than XXX.' ) ) : '' ) . '

- +

' . translate ( 'System Settings' ) . '

'; diff --git a/import.php b/import.php index 7e8703342..f05ad035e 100644 --- a/import.php +++ b/import.php @@ -173,7 +173,8 @@ function print_categories() { print_categories(); echo '
- + '; } echo print_trailer(); diff --git a/includes/dbtable.php b/includes/dbtable.php index d81809fea..989ac510d 100644 --- a/includes/dbtable.php +++ b/includes/dbtable.php @@ -132,8 +132,8 @@ function dbtable_to_html ( $tablear, $valuesar, $action = '', $formname = '', return $ret . ( empty ( $actionlabel ) ? '' : ' - + ' ) . ' diff --git a/layers.php b/layers.php index 38104c469..b6baaa6ec 100644 --- a/layers.php +++ b/layers.php @@ -38,7 +38,6 @@ $duplicatesStr = translate('Duplicates'); $editLayerStr = translate('Edit layer'); $editStr = translate('Edit'); -$enableLayersStr = translate('Enable layers'); $layerStr = translate('Layer'); $LAYERS_DISABLED = translate('Layers are currently disabled.'); $LAYERS_ENABLED = translate('Layers are currently enabled.'); @@ -87,8 +86,14 @@       - " id="enablebutton" > - " id="disablebutton"> + +


@@ -98,7 +103,8 @@
- +

@@ -179,13 +185,16 @@ diff --git a/login-app.php b/login-app.php index 029c14e34..31bdfd07b 100644 --- a/login-app.php +++ b/login-app.php @@ -117,8 +117,8 @@ function myOnLoad() { } echo ' - + diff --git a/login.php b/login.php index 0b4181b14..1c7dba516 100644 --- a/login.php +++ b/login.php @@ -223,7 +223,8 @@
- +
diff --git a/pref.php b/pref.php index 38bf23878..0f349f1bb 100644 --- a/pref.php +++ b/pref.php @@ -209,7 +209,8 @@ function save_pref( $prefs, $src) { $resetConfirm = str_replace("XXX", $user, $resetConfirm); ?>
- + @@ -840,24 +841,27 @@ function save_pref( $prefs, $src) { "> - name=""> + "> - name=""> + "> - name=""> + @@ -894,7 +898,8 @@ function save_pref( $prefs, $src) {

- +

diff --git a/purge.php b/purge.php index 316733999..c22dbb990 100644 --- a/purge.php +++ b/purge.php @@ -109,9 +109,8 @@ } echo '

...' . translate ( 'Finished' ) . ".

\n"; ?> -
' . "$sqlLog
\n"; @@ -160,10 +159,10 @@ - + diff --git a/register.php b/register.php index db90fd485..db83d9056 100644 --- a/register.php +++ b/register.php @@ -371,7 +371,7 @@ function generate_password() function valid_form() { validform = true; - $(':input[type="submit"]').prop('disabled', false); + document.querySelector(':button[type="submit"]').prop('disabled', false); if ($('#upassword1').length && $('#upassword1').val().length == 0) { $('#infoMessage').html(xlate['inputPassword']); $('#main-dialog-alert').show(); @@ -404,7 +404,7 @@ function valid_form() { checkers('uemail', 'email'); } - $(':input[type="submit"]').prop('disabled', !validform); + document.querySelector(':button[type="submit"]').prop('disabled', !validform); return validform; } @@ -430,14 +430,14 @@ function(data, status) { $('#main-dialog-alert').show(); validform = false; if(!validform) { - $(':input[type="submit"]').prop('disabled', true); + document.querySelector(':button[type="submit"]').prop('disabled', true); } return; } if(!validform) { - $(':input[type="submit"]').prop('disabled', true); + document.querySelector(':button[type="submit"]').prop('disabled', true); } else { - $('#main-dialog-alert').hide(); + document.querySelector('#main-dialog-alert').hide(); } }); } diff --git a/reject_entry.php b/reject_entry.php index 48e69f58e..1a6968783 100644 --- a/reject_entry.php +++ b/reject_entry.php @@ -28,8 +28,8 @@ . ' - + ' diff --git a/remotecal_mgmt.php b/remotecal_mgmt.php index 648fcf849..74f23a4fc 100644 --- a/remotecal_mgmt.php +++ b/remotecal_mgmt.php @@ -96,7 +96,8 @@
- +
@@ -147,8 +148,11 @@
@@ -178,8 +182,12 @@
@@ -211,8 +219,12 @@ diff --git a/resourcecal_mgmt.php b/resourcecal_mgmt.php index efa6d3e32..542b971f3 100644 --- a/resourcecal_mgmt.php +++ b/resourcecal_mgmt.php @@ -72,7 +72,8 @@
- +
@@ -129,8 +130,11 @@ @@ -159,8 +163,11 @@
diff --git a/search.php b/search.php index 5ae1986a7..89cc5076a 100644 --- a/search.php +++ b/search.php @@ -160,13 +160,14 @@ } echo '' - . ( $GROUPS_ENABLED == 'Y' - ? '' : '' ) . ' + . ( $GROUPS_ENABLED === 'Y' + ? '' : '' ) . ' '; } -echo ''; +echo ''; ?>