| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function buildForm() |
||
| 31 | { |
||
| 32 | $parentId = $this->request->input('parent_id'); |
||
| 33 | |||
| 34 | $this |
||
| 35 | ->add('title', 'text', [ |
||
| 36 | 'rules' => sprintf('required|wiki_route:%d|wiki_unique:0,%d', $parentId, $parentId), |
||
|
|
|||
| 37 | 'label' => 'Tytuł', |
||
| 38 | 'attr' => [ |
||
| 39 | 'readonly' => 'readonly' |
||
| 40 | ] |
||
| 41 | ]) |
||
| 42 | ->add('parent_id', 'select', [ |
||
| 43 | 'label' => 'Nowa strona macierzysta', |
||
| 44 | 'rules' => 'sometimes|int|exists:wiki_paths,path_id', |
||
| 45 | 'choices' => $this->getTreeList(), |
||
| 46 | 'empty_value' => '--', |
||
| 47 | 'value' => '' |
||
| 48 | ]) |
||
| 49 | ->add('submit', 'submit', [ |
||
| 50 | 'label' => 'Kopiuj', |
||
| 51 | 'attr' => [ |
||
| 52 | 'data-submit-state' => 'Kopiowanie...' |
||
| 53 | ] |
||
| 57 |