From 233b2f472ced337f79b68a5ccc6888119686213a Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 5 Jan 2023 10:24:49 -0700 Subject: [PATCH] Fix duration in nextmatch row did not show correct value --- api/src/Etemplate/Widget/Date.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/src/Etemplate/Widget/Date.php b/api/src/Etemplate/Widget/Date.php index c977a8b57a..2dbca614b9 100644 --- a/api/src/Etemplate/Widget/Date.php +++ b/api/src/Etemplate/Widget/Date.php @@ -89,7 +89,7 @@ class Date extends Transformer */ public function set_row_value($cname, array $expand, array &$data) { - if($this->type == 'date-duration') + if($this->type == 'et2-date-duration') { return; } @@ -161,7 +161,8 @@ class Date extends Transformer { $form_name = self::form_name($cname, $this->id, $expand); - if(!$this->is_readonly($cname, $form_name) && $this->type != 'date-since') // date-since is always readonly + if(!$this->is_readonly($cname, $form_name) && !in_array($this->type, ['et2-date-since', + 'date-since'])) // date-since is always readonly { $value = self::get_array($content, $form_name); $valid =& self::get_array($validated, $form_name, true);