Skip to content

Commit

Permalink
Merge pull request #24 from EcoGabe/feature/additional-time
Browse files Browse the repository at this point in the history
[FEATURE] Make extension setting for added time
  • Loading branch information
derhansen authored Jan 19, 2024
2 parents f715926 + c52858a commit e77dd2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Hooks/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function afterSubmit(FormRuntime $runtime, $element, $value, $requestArgu
return '';
}

if ((int)$expirationTime <= time()) {
if ((int)($expirationTime + intval($extensionSettings['crAdditionalExpiration'] ?? 3600)) <= time()) {
$this->logger->debug('CR response expired. Submitted data', $requestArguments);
return '';
}
Expand Down
2 changes: 2 additions & 0 deletions ext_conf_template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
###########################
# cat=settings/enable/10; type=integer; label=Delay in seconds when response calculation is set using JavaScript
crJavaScriptDelay = 3
# cat=settings/enable/20; type=integer; label=Additional time in seconds to add on to page lifetime
crAdditionalExpiration = 3600

0 comments on commit e77dd2f

Please sign in to comment.