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">
|
||||
<br>
|
||||
|
||||
|
||||
<label for="number">Runder:</label>
|
||||
<br>
|
||||
<input type="number" id="rounds" name="rounds" value="<?=htmlspecialchars($team->rounds)?>" maxlength="32">
|
||||
<br>
|
||||
|
||||
<br>
|
||||
<input type="submit" value="Lagre">
|
||||
<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');
|
||||
$phone = filter_input(INPUT_POST, 'phone', FILTER_VALIDATE_INT);
|
||||
$participants = filter_input(INPUT_POST, 'participants', FILTER_VALIDATE_INT);
|
||||
$rounds = filter_input(INPUT_POST, 'rounds', FILTER_VALIDATE_INT);
|
||||
|
||||
$team = new Team;
|
||||
try {
|
||||
@ -39,7 +38,6 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST')
|
||||
$team->setLeader($leader);
|
||||
$team->setPhone($phone);
|
||||
$team->setParticipants($participants);
|
||||
$team->setRounds($rounds);
|
||||
} catch(InvalidArgumentException $e) {
|
||||
$app->session->flash('Kunne ikke oppdatere lag: Validerings feil: ' . $e->getMessage() , 'danger');
|
||||
$app->redirect('index.php');
|
||||
|
Reference in New Issue
Block a user