MAPG-235 added radio button for time limit type and fixed saving restrictions for challenge

This commit is contained in:
balazs committed 2021-05-19 17:55:04 +02:00
1 parent ae7fd98256
commit 77ff175794
4 files changed
+22 -8

No files matched your search

+7 -4
View File
@@ -112,16 +112,19 @@ class GameController
$challenge->setToken($challengeToken);
$challenge->setCreatedDate(new DateTime());
if($this->request->post('timerEnabled') !== null && $this->request->post('timeLimit') !== null) {
if ($this->request->post('timerEnabled') !== null && $this->request->post('timeLimit') !== null) {
$challenge->setTimeLimit($this->request->post('timeLimit'));
}
if($this->request->post('noMove') !== null) {
if ($this->request->post('timeLimitType') !== null) {
$challenge->setTimeLimitType($this->request->post('timeLimitType'));
}
if ($this->request->post('noMove') !== null) {
$challenge->setNoMove(true);
}
if($this->request->post('noPan') !== null) {
if ($this->request->post('noPan') !== null) {
$challenge->setNoPan(true);
}
if($this->request->post('noZoom') !== null) {
if ($this->request->post('noZoom') !== null) {
$challenge->setNoZoom(true);
}