From ecd8b08373c4a68df2984a1d43f1e83a1db8acb0 Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 22 Feb 2022 10:01:55 -0700 Subject: [PATCH] Fix timesheet edit could not select start date Unimplemented "mode" legacy option was conflicting with flatpickr "mode" attribute --- api/etemplate.php | 18 +++++++++--------- timesheet/templates/default/edit.xet | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api/etemplate.php b/api/etemplate.php index d0bb0a521d..f4559a7704 100644 --- a/api/etemplate.php +++ b/api/etemplate.php @@ -77,16 +77,16 @@ function send_template() list($matches[1], $matches[2]) = explode('-', $type[1], 2); } static $legacy_options = array( - 'select' => 'empty_label', - 'box' => ',cellpadding,cellspacing,keep', - 'hbox' => 'cellpadding,cellspacing,keep', - 'vbox' => 'cellpadding,cellspacing,keep', - 'groupbox' => 'cellpadding,cellspacing,keep', - 'checkbox' => 'selected_value,unselected_value,ro_true,ro_false', - 'radio' => 'set_value,ro_true,ro_false', + 'select' => 'empty_label', + 'box' => ',cellpadding,cellspacing,keep', + 'hbox' => 'cellpadding,cellspacing,keep', + 'vbox' => 'cellpadding,cellspacing,keep', + 'groupbox' => 'cellpadding,cellspacing,keep', + 'checkbox' => 'selected_value,unselected_value,ro_true,ro_false', + 'radio' => 'set_value,ro_true,ro_false', 'customfields' => 'sub-type,use-private,field-names', - 'date' => 'data_format,mode', - 'description' => 'bold-italic,link,activate_links,label_for,link_target,link_popup_size,link_title', + 'date' => 'data_format', // Legacy option "mode" was never implemented in et2 + 'description' => 'bold-italic,link,activate_links,label_for,link_target,link_popup_size,link_title', ); // prefer more specific type-subtype over just type $names = $legacy_options[$matches[1].$matches[2]] ?? $legacy_options[$matches[1]] ?? null; diff --git a/timesheet/templates/default/edit.xet b/timesheet/templates/default/edit.xet index 5893f89923..236038329d 100644 --- a/timesheet/templates/default/edit.xet +++ b/timesheet/templates/default/edit.xet @@ -102,7 +102,7 @@ - +