feature/MAPG-235-basic-challenge-mode #48
@ -84,7 +84,7 @@ div.mapItem>div.buttonContainer {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
#restrictions input[type=checkbox] {
|
||||
#restrictions input {
|
||||
height: auto;
|
||||
margin: 0.5em;
|
||||
}
|
||||
@ -94,6 +94,10 @@ div.mapItem>div.buttonContainer {
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
#timeLimitType {
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1504px) {
|
||||
#mapContainer {
|
||||
grid-template-columns: auto auto auto auto;
|
||||
|
@ -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
|
||||
|
@ -53,6 +53,13 @@ TODO: condition!
|
||||
<div>
|
||||
<input type="range" id="timeLimit" name="timeLimit" min="10" max="600" value="120" />
|
||||
</div>
|
||||
<div id="timeLimitType">
|
||||
Time limit
|
||||
<input type="radio" id="timeLimitTypeGame" name="timeLimitType" value="game" checked />
|
||||
<label for="timeLimitTypeGame">for the whole game</label>
|
||||
<input type="radio" id="timeLimitTypeRound" name="timeLimitType" value="round" />
|
||||
<label for="timeLimitTypeRound">per round</label>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<input type="checkbox" id="noMove" name="noMove" value="noMove" />
|
||||
|
Loading…
Reference in New Issue
Block a user