Commit
This commit is contained in:
parent
1144fc16f6
commit
4a76b1ce81
@ -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>[ <a class="danger" href="index.php">Avbryt</a> ]</span>
|
<span>[ <a class="danger" href="index.php">Avbryt</a> ]</span>
|
||||||
|
@ -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');
|
||||||
|
Reference in New Issue
Block a user