This commit is contained in:
William 2022-03-16 13:46:30 +01:00
parent 1144fc16f6
commit 4a76b1ce81
2 changed files with 0 additions and 8 deletions

View File

@ -37,12 +37,6 @@
<input type="number" id="participants" name="participants" value="<?=htmlspecialchars($team->participants)?>" maxlength="32"> <input type="number" id="participants" name="participants" value="<?=htmlspecialchars($team->participants)?>" maxlength="32">
<br> <br>
<label for="number">Runder:</label>
<br>
<input type="number" id="rounds" name="rounds" value="<?=htmlspecialchars($team->rounds)?>" maxlength="32">
<br>
<br> <br>
<input type="submit" value="Lagre"> <input type="submit" value="Lagre">
<span>[&nbsp;<a class="danger" href="index.php">Avbryt</a>&nbsp;]</span> <span>[&nbsp;<a class="danger" href="index.php">Avbryt</a>&nbsp;]</span>

View File

@ -29,7 +29,6 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST')
$leader = filter_input(INPUT_POST, 'leader'); $leader = filter_input(INPUT_POST, 'leader');
$phone = filter_input(INPUT_POST, 'phone', FILTER_VALIDATE_INT); $phone = filter_input(INPUT_POST, 'phone', FILTER_VALIDATE_INT);
$participants = filter_input(INPUT_POST, 'participants', FILTER_VALIDATE_INT); $participants = filter_input(INPUT_POST, 'participants', FILTER_VALIDATE_INT);
$rounds = filter_input(INPUT_POST, 'rounds', FILTER_VALIDATE_INT);
$team = new Team; $team = new Team;
try { try {
@ -39,7 +38,6 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST')
$team->setLeader($leader); $team->setLeader($leader);
$team->setPhone($phone); $team->setPhone($phone);
$team->setParticipants($participants); $team->setParticipants($participants);
$team->setRounds($rounds);
} catch(InvalidArgumentException $e) { } catch(InvalidArgumentException $e) {
$app->session->flash('Kunne ikke oppdatere lag: Validerings feil: ' . $e->getMessage() , 'danger'); $app->session->flash('Kunne ikke oppdatere lag: Validerings feil: ' . $e->getMessage() , 'danger');
$app->redirect('index.php'); $app->redirect('index.php');