MAPG-235 added radio button for time limit type and fixed saving restrictions for challenge
This commit is contained in:
1 parent
ae7fd98256
commit
77ff175794
4 files changed
+22
-8
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,17 +47,17 @@ class Challenge extends Model
|
||||
|
||||
public function setNoMove(bool $noMove): void
|
||||
{
|
||||
$this->$noMove = $noMove;
|
||||
$this->noMove = $noMove;
|
||||
}
|
||||
|
||||
public function setNoPan(bool $noPan): void
|
||||
{
|
||||
$this->$noPan = $noPan;
|
||||
$this->noPan = $noPan;
|
||||
}
|
||||
|
||||
public function setNoZoom(bool $noZoom): void
|
||||
{
|
||||
$this->$noZoom = $noZoom;
|
||||
$this->noZoom = $noZoom;
|
||||
}
|
||||
|
||||
public function setCreatedDate(DateTime $created): void
|
||||
|
||||
Reference in new issue
Block a user