From 62f988ea9851ef912d220108c6bf91f1192235a8 Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Wed, 5 Aug 2020 13:23:20 +0200 Subject: [PATCH] Fixed issue #16561: Batch-editing tokens does not set fields properly if "completed", "invitation sent" or "reminder sent" is set to No. Fixed issue: When editing a token the date/time format is not properly displayed and handled on "invitation sent" or "reminder sent" field and thus wrong values are saved --- application/controllers/admin/tokens.php | 5 ++++- application/views/admin/token/tokenform.php | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/application/controllers/admin/tokens.php b/application/controllers/admin/tokens.php index 5c9dceb37d1..d5d96acb708 100644 --- a/application/controllers/admin/tokens.php +++ b/application/controllers/admin/tokens.php @@ -424,9 +424,12 @@ public function editMultiple() foreach ($aCoreTokenFields as $sCoreTokenField) { if (trim(Yii::app()->request->getPost($sCoreTokenField, 'lskeep')) != 'lskeep') { $value = flattenText(Yii::app()->request->getPost($sCoreTokenField)); - if ($sCoreTokenField == 'language' and empty($value)) { + if ($sCoreTokenField == 'language' && empty($value)) { continue; } + if (($sCoreTokenField == 'sent' || $sCoreTokenField == 'remindersent' || $sCoreTokenField == 'completed') && empty($value)) { + $value='N'; + } $aData[$sCoreTokenField] = $value; } } diff --git a/application/views/admin/token/tokenform.php b/application/views/admin/token/tokenform.php index cb81bd77c1b..c2a5b6409b4 100644 --- a/application/views/admin/token/tokenform.php +++ b/application/views/admin/token/tokenform.php @@ -287,13 +287,13 @@
>
- +
- " /> + " />
@@ -333,13 +333,13 @@
>
- +
- " /> + " />