Revize 5d599617
Přidáno uživatelem Jakub Vašta před asi 4 roky(ů)
website/src/Form/DataSetType.php | ||
---|---|---|
22 | 22 |
} |
23 | 23 |
|
24 | 24 |
public function buildForm(FormBuilderInterface $builder, array $options) { |
25 |
$selectTypeData = null == $options['data']->getDate() ? |
|
26 |
Utils::prepareDatasetsNames($this->manager->getAvailableCollections()) : |
|
27 |
$this->manager->getAvailableCollectionsByDay($options['data']->getDate()); |
|
28 |
|
|
29 | 25 |
$builder |
30 | 26 |
->add('date', TextType::class) |
31 | 27 |
->add('time', ChoiceType::class, [ |
... | ... | |
57 | 53 |
], |
58 | 54 |
]) |
59 | 55 |
->add('type', ChoiceType::class, [ |
60 |
'choices' => $selectTypeData,
|
|
56 |
'choices' => Utils::prepareDatasetsNames($this->manager->getAvailableCollections()),
|
|
61 | 57 |
]) |
62 | 58 |
->add('submit', SubmitType::class); |
63 | 59 |
} |
Také k dispozici: Unified diff
Re #8080
+ data set type select box change - options are disabled not removed