Skip to content

Commit

Permalink
Bug no. 39 - Readonly pole se ukládá, lze změnit termín přidáním term_id
Browse files Browse the repository at this point in the history
Při úpravě přihlášky rodičem lze v HTML odebrat readonly
atribut a ukládat tak hodnotu.
Navíc přidáním pole term_id lze změnit i termín přihlášky. Příklad ve Wiki
  • Loading branch information
arxeiss committed Feb 23, 2023
1 parent 6a6c0a8 commit 85dd2c0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/Http/Requests/Student/UpdateStudentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public function rules(?Term $term = null): array
$term = $this->route()->student->term;
$rules = parent::rules($term);

unset($rules['forename']);
unset($rules['surname']);
// unset($rules['forename']);
// unset($rules['surname']);
unset($rules['terms_conditions']);

return $rules;
Expand All @@ -29,11 +29,11 @@ public function rules(?Term $term = null): array
*/
public function getData(bool $addTerm = false): array
{
$data = parent::getData($addTerm);
$data = parent::getData(false);

unset($data['term_id']);
unset($data['forename']);
unset($data['surname']);
// unset($data['term_id']);
// unset($data['forename']);
// unset($data['surname']);

return $data;
}
Expand Down

0 comments on commit 85dd2c0

Please sign in to comment.