Skip to content

Commit

Permalink
Fixed issue #16561: Batch-editing tokens does not set fields properly…
Browse files Browse the repository at this point in the history
… if "completed", "invitation sent" or "reminder sent" is set to No.
  • Loading branch information
c-schmitz committed Aug 6, 2020
1 parent da651c7 commit ee73610
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion application/controllers/admin/tokens.php
Expand Up @@ -790,8 +790,10 @@ public function edit($iSurveyId, $iTokenId, $ajax = false)
}

// completed
if (trim($request->getPost('completed')) == 'N') {
if (trim($request->getPost('completed')) == 'N' || trim($request->getPost('completed')) == '') {
$_POST['completed'] = 'N';
} elseif (trim($request->getPost('completed')) == 'Y') {
$_POST['completed'] = 'Y';
} else {
$datetimeobj = new Date_Time_Converter(trim($request->getPost('completed')), $dateformatdetails['phpdate'].' H:i');
$_POST['completed'] = $datetimeobj->convert('Y-m-d H:i');
Expand Down

0 comments on commit ee73610

Please sign in to comment.