@@ -186,6 +206,11 @@
{_admin.configuration.menu.skautis}
+
+
+
+
+ {if $guestRole}
+
+
+ {elseif $groupLeaderRole}
+
+
+
+ {_web.application_content.approved_registration, ['roles' => $dbUser->getRolesText()]}
+
+
+
+
+
+
+
+ Název skupiny: {$group->getName()}
+
+
+ Status: {$group->getGroupStatus()}
+
+
+ Max pocet mist: {$group->getPlaces()}
+
+
+ Kod: {$group->getCode()}
+
+
+ Pocet clenu: {$groupUsersCount}
+
+
+ Pocet volnych mist: {($group->getPlaces())-$groupUsersCount}
+
+
+
+
+
+
+
+ {control groupUsersGrid}
+
+
+ {elseif $groupMemberRole}
+
+
+
+ {_web.application_content.approved_registration, ['roles' => $dbUser->getRolesText()]}
+
+
+
+
+
+
+
+ Název skupiny: {$group->getName()}
+
+
+ Status: {$group->getGroupStatus()}
+
+
+ Vedoucí: {$groupLeaderName}
+
+
+ Email vedoucího: {$group->getLeaderEmail()}
+
+
+
+
+
+ {elseif $nonregisteredRole}
+ {if $noRegisterableRole}
+
+
+
+ {if $registrationStart && $registrationEnd}
+ {_web.application_content.no_registerable_role_start_end, ['start' => $registrationStart->format('j. n. Y H:i'), 'end' => $registrationEnd->format('j. n. Y H:i')]}
+ {elseif $registrationStart}
+ {_web.application_content.no_registerable_role_start, ['start' => $registrationStart->format('j. n. Y H:i')]}
+ {elseif $registrationEnd}
+ {_web.application_content.no_registerable_role_end, ['end' => $registrationEnd->format('j. n. Y H:i')]}
+ {else}
+ {_web.application_content.no_registerable_role}
+ {/if}
+
+
+
+ {else}
+
+
+
+ {control applicationGroupForm}
+
+
+
+ {/if}
+ {else}
+ {if $unapprovedRole}
+
+
+
+ {_web.application_content.unapproved_registration, ['roles' => $dbUser->getRolesText()]}
+
+
+
+ {else}
+
+
+
+ {_web.application_content.approved_registration, ['roles' => $dbUser->getRolesText()]}
+
+
+
+
+
+ {control applicationsGrid}
+
+
+ {/if}
+ {/if}
+
diff --git a/app/WebModule/Components/templates/application_group_content_scripts.latte b/app/WebModule/Components/templates/application_group_content_scripts.latte
new file mode 100644
index 000000000..db92a4b7d
--- /dev/null
+++ b/app/WebModule/Components/templates/application_group_content_scripts.latte
@@ -0,0 +1,46 @@
+
diff --git a/app/WebModule/Components/templates/groupUsers_grid.latte b/app/WebModule/Components/templates/groupUsers_grid.latte
new file mode 100644
index 000000000..44d7f0ef3
--- /dev/null
+++ b/app/WebModule/Components/templates/groupUsers_grid.latte
@@ -0,0 +1 @@
+{control groupUsersGrid}
diff --git a/app/WebModule/Forms/ApplicationGroupFormFactory.php b/app/WebModule/Forms/ApplicationGroupFormFactory.php
new file mode 100644
index 000000000..9024ab2b6
--- /dev/null
+++ b/app/WebModule/Forms/ApplicationGroupFormFactory.php
@@ -0,0 +1,674 @@
+user = $user;
+
+ $form = $this->baseFormFactory->create();
+
+ $inputSex = $form->addRadioList('sex', 'web.application_content.sex', Sex::getSexOptions());
+
+ $inputFirstName = $form->addText('firstName', 'web.application_content.firstname')
+ ->addRule(Form::FILLED, 'web.application_content.firstname_empty');
+
+ $inputLastName = $form->addText('lastName', 'web.application_content.lastname')
+ ->addRule(Form::FILLED, 'web.application_content.lastname_empty');
+
+ $inputNickName = $form->addText('nickName', 'web.application_content.nickname');
+
+ $inputBirthdateDate = new DateControl('web.application_content.birthdate');
+ $inputBirthdateDate->addRule(Form::FILLED, 'web.application_content.birthdate_empty');
+ $form->addComponent($inputBirthdateDate, 'birthdate');
+
+ if ($this->user->isMember()) {
+ $inputSex->setDisabled();
+ $inputFirstName->setDisabled();
+ $inputLastName->setDisabled();
+ $inputNickName->setDisabled();
+ $inputBirthdateDate->setDisabled();
+ }
+
+ $form->addText('email', 'web.application_content.email')
+ ->setDisabled();
+
+ $form->addText('phone', 'web.application_content.phone')
+ ->setDisabled();
+
+ $form->addText('street', 'web.application_content.street')
+ ->addRule(Form::FILLED, 'web.application_content.street_empty')
+ ->addRule(Form::PATTERN, 'web.application_content.street_format', '^(.*[^0-9]+) (([1-9][0-9]*)/)?([1-9][0-9]*[a-cA-C]?)$');
+
+ $form->addText('city', 'web.application_content.city')
+ ->addRule(Form::FILLED, 'web.application_content.city_empty');
+
+ $form->addText('postcode', 'web.application_content.postcode')
+ ->addRule(Form::FILLED, 'web.application_content.postcode_empty')
+ ->addRule(Form::PATTERN, 'web.application_content.postcode_format', '^\d{3} ?\d{2}$');
+
+ $form->addText('state', 'web.application_content.state')
+ ->addRule(Form::FILLED, 'web.application_content.state_empty');
+
+ $form->addSelect('roles', 'web.application_content.roles', [9 => 'Vedoucí skupiny', 10 => 'Člen skupiny'])
+ ->addCondition($form::EQUAL, 9)
+ ->toggle('group-name')
+ ->toggle('group-members-count')
+ ->elseCondition($form::EQUAL, 10)
+ ->toggle('group-code')
+
+ ->addRule(Form::FILLED, 'web.application_content.custom_input_empty');
+
+ $form->addText('groupName', 'groupName')
+ ->setOption('id', 'group-name')
+ ->addCondition(Form::FILLED);
+
+ $form->addText('groupMembersCount', 'groupMembersCount')
+ ->setOption('id', 'group-members-count')
+ ->addCondition(Form::FILLED);
+
+ $form->addText('groupCode', 'groupCode')
+ ->setOption('id', 'group-code')
+ ->addCondition(Form::FILLED);
+
+// $this->addRolesSelect($form);
+
+// $this->addSubeventsSelect($form);
+
+// $this->addCustomInputs($form);
+
+ $form->addCheckbox('agreement', $this->queryBus->handle(new SettingStringValueQuery(Settings::APPLICATION_AGREEMENT)))
+ ->addRule(Form::FILLED, 'web.application_content.agreement_empty');
+
+ $form->addSubmit('submit', 'web.application_content.register');
+
+ $form->setDefaults([
+ 'sex' => $this->user->getSex(),
+ 'firstName' => $this->user->getFirstName(),
+ 'lastName' => $this->user->getLastName(),
+ 'nickName' => $this->user->getNickName(),
+ 'birthdate' => $this->user->getBirthdate(),
+ 'email' => $this->user->getEmail(),
+ 'phone' => $this->user->getPhone(),
+ 'street' => $this->user->getStreet(),
+ 'city' => $this->user->getCity(),
+ 'postcode' => $this->user->getPostcode(),
+ 'state' => $this->user->getState(),
+ ]);
+
+ $form->onSuccess[] = [$this, 'processForm'];
+
+ return $form;
+ }
+
+ /**
+ * Zpracuje formulář.
+ *
+ * @throws Throwable
+ */
+ public function processForm(Form $form, stdClass $values): void
+ {
+ $this->em->wrapInTransaction(function () use ($values): void {
+ if (property_exists($values, 'sex')) {
+ $this->user->setSex($values->sex);
+ }
+
+ if (property_exists($values, 'firstName')) {
+ $this->user->setFirstName($values->firstName);
+ }
+
+ if (property_exists($values, 'lastName')) {
+ $this->user->setLastName($values->lastName);
+ }
+
+ if (property_exists($values, 'nickName')) {
+ $this->user->setNickName($values->nickName);
+ }
+
+ if (property_exists($values, 'birthdate')) {
+ $this->user->setBirthdate($values->birthdate);
+ }
+
+ $this->user->setStreet($values->street);
+ $this->user->setCity($values->city);
+ $this->user->setPostcode($values->postcode);
+ $this->user->setState($values->state);
+
+/*
+ // role
+ if (property_exists($values, 'roles')) {
+ $roles = $this->roleRepository->findRolesByIds($values->roles);
+ } else {
+ $roles = $this->roleRepository->findFilteredRoles(true, false, false);
+ }
+*/
+ //group akce
+ switch ($values->roles) {
+ //vedouci skupiny
+ case 9:
+ if (property_exists($values, 'groupName') && (property_exists($values, 'groupMembersCount'))) {
+ $group = new Group();
+
+ $group->setName($values->groupName);
+ $group->setLeaderId($this->user->getId());
+ $group->setLeaderEmail($this->user->getEmail());
+ $group->setPlaces($values->groupMembersCount);
+ $group->setGroupStatus('waiting_for_filling');
+
+ $this->groupRepository->save($group);
+
+ $groupGeneratedCode = $group->getId() . time();
+ $group->setCode($groupGeneratedCode);
+
+ $this->groupRepository->save($group);
+
+ $this->user->setGroupId($group->getId());
+
+ $userRole = $this->roleRepository->findById($values->roles);
+ $this->user->addRole($userRole);
+ }
+
+ break;
+
+ //clen skupiny
+ case 10:
+ if (property_exists($values, 'groupCode')) {
+ $group = $this->groupRepository->findByCode($values->groupCode);
+ if (! $group) {
+ throw new InvalidArgumentException('Invalid code.');
+ }
+
+ $this->user->setGroupId($group->getId());
+ $userRole = $this->roleRepository->findById($values->roles);
+ $this->user->addRole($userRole);
+ }
+
+ break;
+ }
+
+/*
+ // vlastni pole
+ foreach ($this->customInputRepository->findByRolesOrderedByPosition($roles) as $customInput) {
+ $customInputId = 'custom' . $customInput->getId();
+ $customInputValue = $this->user->getCustomInputValue($customInput);
+
+ if ($customInput instanceof CustomText) {
+ $customInputValue = $customInputValue ?: new CustomTextValue($customInput, $this->user);
+ assert($customInputValue instanceof CustomTextValue);
+ $customInputValue->setValue($values->$customInputId);
+ } elseif ($customInput instanceof CustomCheckbox) {
+ $customInputValue = $customInputValue ?: new CustomCheckboxValue($customInput, $this->user);
+ assert($customInputValue instanceof CustomCheckboxValue);
+ $customInputValue->setValue($values->$customInputId);
+ } elseif ($customInput instanceof CustomSelect) {
+ $customInputValue = $customInputValue ?: new CustomSelectValue($customInput, $this->user);
+ assert($customInputValue instanceof CustomSelectValue);
+ $customInputValue->setValue($values->$customInputId);
+ } elseif ($customInput instanceof CustomMultiSelect) {
+ $customInputValue = $customInputValue ?: new CustomMultiSelectValue($customInput, $this->user);
+ assert($customInputValue instanceof CustomMultiSelectValue);
+ $customInputValue->setValue($values->$customInputId);
+ } elseif ($customInput instanceof CustomFile) {
+ $customInputValue = $customInputValue ?: new CustomFileValue($customInput, $this->user);
+ assert($customInputValue instanceof CustomFileValue);
+ $file = $values->$customInputId;
+ assert($file instanceof FileUpload);
+ if ($file->getError() === UPLOAD_ERR_OK) {
+ $path = $this->filesService->save($file, CustomFile::PATH, true, $file->name);
+ $customInputValue->setValue($path);
+ }
+ } elseif ($customInput instanceof CustomDate) {
+ $customInputValue = $customInputValue ?: new CustomDateValue($customInput, $this->user);
+ assert($customInputValue instanceof CustomDateValue);
+ $customInputValue->setValue($values->$customInputId);
+ } elseif ($customInput instanceof CustomDateTime) {
+ $customInputValue = $customInputValue ?: new CustomDateTimeValue($customInput, $this->user);
+ assert($customInputValue instanceof CustomDateTimeValue);
+ $customInputValue->setValue($values->$customInputId);
+ }
+
+ $this->customInputValueRepository->save($customInputValue);
+ }
+*/
+ // podakce
+ $subevents = '';
+/*
+ $subevents = $this->subeventRepository->explicitSubeventsExists() && ! empty($values->subevents)
+ ? $this->subeventRepository->findSubeventsByIds($values->subevents)
+ : new ArrayCollection([$this->subeventRepository->findImplicit()]);
+*/
+ // aktualizace údajů ve skautIS, jen pokud nemá propojený účet
+ if (! $this->user->isMember()) {
+ try {
+ $this->skautIsService->updatePersonBasic(
+ $this->user->getSkautISPersonId(),
+ $this->user->getSex(),
+ $this->user->getBirthdate(),
+ $this->user->getFirstName(),
+ $this->user->getLastName(),
+ $this->user->getNickName(),
+ );
+
+ $this->skautIsService->updatePersonAddress(
+ $this->user->getSkautISPersonId(),
+ $this->user->getStreet(),
+ $this->user->getCity(),
+ $this->user->getPostcode(),
+ $this->user->getState(),
+ );
+ } catch (WsdlException $ex) {
+ Debugger::log($ex, ILogger::WARNING);
+ $this->onSkautIsError();
+ }
+ }
+
+ // vytvoreni prihlasky
+// $this->applicationGroupService->register($this->user, $roles, $this->user);
+// $this->applicationGroupService->register_group($this->user, $roles, $this->user, $group);
+ });
+ }
+
+ /**
+ * Přidá vlastní pole přihlášky.
+ */
+ private function addCustomInputs(Form $form): void
+ {
+ foreach ($this->customInputRepository->findAllOrderedByPosition() as $customInput) {
+ $customInputId = 'custom' . $customInput->getId();
+ $customInputName = $customInput->getName();
+
+ switch (true) {
+ case $customInput instanceof CustomText:
+ $custom = $form->addText($customInputId, $customInputName);
+ break;
+
+ case $customInput instanceof CustomCheckbox:
+ $custom = $form->addCheckbox($customInputId, $customInputName);
+ break;
+
+ case $customInput instanceof CustomSelect:
+ $custom = $form->addSelect($customInputId, $customInputName, $customInput->getSelectOptions());
+ break;
+
+ case $customInput instanceof CustomMultiSelect:
+ $custom = $form->addMultiSelect($customInputId, $customInputName, $customInput->getSelectOptions());
+ break;
+
+ case $customInput instanceof CustomFile:
+ $custom = $form->addUpload($customInputId, $customInputName);
+ $custom->setHtmlAttribute('data-show-preview', 'true');
+ break;
+
+ case $customInput instanceof CustomDate:
+ $custom = new DateControl($customInputName);
+ $form->addComponent($custom, $customInputId);
+ break;
+
+ case $customInput instanceof CustomDateTime:
+ $custom = new DateTimeControl($customInputName);
+ $form->addComponent($custom, $customInputId);
+ break;
+
+ default:
+ throw new InvalidArgumentException();
+ }
+
+ $custom->setOption('id', 'form-group-' . $customInputId);
+
+ if ($customInput->isMandatory()) {
+ $rolesSelect = $form['roles'];
+ assert($rolesSelect instanceof MultiSelectBox);
+ $custom->addConditionOn($rolesSelect, self::class . '::toggleCustomInputRequired', ['id' => $customInputId, 'roles' => Helpers::getIds($customInput->getRoles())])
+ ->addRule(Form::FILLED, 'web.application_content.custom_input_empty');
+ }
+ }
+ }
+
+ /**
+ * Přidá select pro výběr podakcí.
+ *
+ * @throws NonUniqueResultException
+ * @throws NoResultException
+ */
+ private function addSubeventsSelect(Form $form): void
+ {
+ if (! $this->subeventRepository->explicitSubeventsExists()) {
+ return;
+ }
+
+ $subeventsOptions = $this->subeventService->getSubeventsOptionsWithCapacity(true, true, false, false);
+
+ $subeventsSelect = $form->addMultiSelect('subevents', 'web.application_content.subevents')->setItems(
+ $subeventsOptions,
+ );
+ $subeventsSelect->setOption('id', 'form-group-subevents');
+
+ $rolesSelect = $form['roles'];
+ assert($rolesSelect instanceof MultiSelectBox);
+ $subeventsSelect->addConditionOn(
+ $rolesSelect,
+ self::class . '::toggleSubeventsRequired',
+ Helpers::getIds($this->roleRepository->findFilteredRoles(false, true, false)),
+ )->addRule(Form::FILLED, 'web.application_content.subevents_empty');
+
+ $subeventsSelect
+ ->setRequired(false)
+ ->addRule([$this, 'validateSubeventsCapacities'], 'web.application_content.subevents_capacity_occupied');
+
+ // generovani chybovych hlasek pro vsechny kombinace podakci
+ foreach ($this->subeventRepository->findFilteredSubevents(true, false, false, false) as $subevent) {
+ if (! $subevent->getIncompatibleSubevents()->isEmpty()) {
+ $subeventsSelect->addRule(
+ [$this, 'validateSubeventsIncompatible'],
+ $this->translator->translate(
+ 'web.application_content.incompatible_subevents_selected',
+ null,
+ ['subevent' => $subevent->getName(), 'incompatibleSubevents' => $subevent->getIncompatibleSubeventsText()],
+ ),
+ [$subevent],
+ );
+ }
+
+ if (! $subevent->getRequiredSubeventsTransitive()->isEmpty()) {
+ $subeventsSelect->addRule(
+ [$this, 'validateSubeventsRequired'],
+ $this->translator->translate(
+ 'web.application_content.required_subevents_not_selected',
+ null,
+ ['subevent' => $subevent->getName(), 'requiredSubevents' => $subevent->getRequiredSubeventsTransitiveText()],
+ ),
+ [$subevent],
+ );
+ }
+ }
+ }
+
+ /**
+ * Přidá select pro výběr rolí.
+ */
+ private function addRolesSelect(Form $form): void
+ {
+ $registerableOptions = $this->aclService->getRolesOptionsWithCapacity(true, false);
+
+ $rolesSelect = $form->addMultiSelect('roles', 'web.application_content.roles')->setItems(
+ $registerableOptions,
+ );
+
+ foreach ($this->customInputRepository->findAll() as $customInput) {
+ $customInputId = 'custom' . $customInput->getId();
+ $rolesSelect->addCondition(self::class . '::toggleCustomInputVisibility', Helpers::getIds($customInput->getRoles()))
+ ->toggle('form-group-' . $customInputId);
+ }
+
+ $rolesSelect->addRule(Form::FILLED, 'web.application_content.roles_empty')
+ ->addRule([$this, 'validateRolesCapacities'], 'web.application_content.roles_capacity_occupied')
+ ->addRule([$this, 'validateRolesRegisterable'], 'web.application_content.roles_not_registerable')
+ ->addRule([$this, 'validateRolesMinimumAge'], 'web.application_content.roles_require_minimum_age');
+
+ // generovani chybovych hlasek pro vsechny kombinace roli
+ foreach ($this->roleRepository->findFilteredRoles(true, false, true, $this->user) as $role) {
+ if (! $role->getIncompatibleRoles()->isEmpty()) {
+ $rolesSelect->addRule(
+ [$this, 'validateRolesIncompatible'],
+ $this->translator->translate(
+ 'web.application_content.incompatible_roles_selected',
+ null,
+ ['role' => $role->getName(), 'incompatibleRoles' => $role->getIncompatibleRolesText()],
+ ),
+ [$role],
+ );
+ }
+
+ if (! $role->getRequiredRolesTransitive()->isEmpty()) {
+ $rolesSelect->addRule(
+ [$this, 'validateRolesRequired'],
+ $this->translator->translate(
+ 'web.application_content.required_roles_not_selected',
+ null,
+ ['role' => $role->getName(), 'requiredRoles' => $role->getRequiredRolesTransitiveText()],
+ ),
+ [$role],
+ );
+ }
+ }
+
+ // pokud je na vyber jen jedna role, je oznacena
+ if (count($registerableOptions) === 1) {
+ $rolesSelect->setDisabled();
+ $rolesSelect->setDefaultValue(array_keys($registerableOptions));
+ }
+ }
+
+ /**
+ * Ověří kapacity podakcí.
+ */
+ public function validateSubeventsCapacities(MultiSelectBox $field): bool
+ {
+ $selectedSubevents = $this->subeventRepository->findSubeventsByIds($field->getVaLue());
+
+ return $this->validators->validateSubeventsCapacities($selectedSubevents, $this->user);
+ }
+
+ /**
+ * Ověří kapacity rolí.
+ */
+ public function validateRolesCapacities(MultiSelectBox $field): bool
+ {
+ $selectedRoles = $this->roleRepository->findRolesByIds($field->getValue());
+
+ return $this->validators->validateRolesCapacities($selectedRoles, $this->user);
+ }
+
+ /**
+ * Ověří kompatibilitu podakcí.
+ *
+ * @param Subevent[] $args
+ */
+ public function validateSubeventsIncompatible(MultiSelectBox $field, array $args): bool
+ {
+ $selectedSubevents = $this->subeventRepository->findSubeventsByIds($field->getValue());
+ $testSubevent = $args[0];
+
+ return $this->validators->validateSubeventsIncompatible($selectedSubevents, $testSubevent);
+ }
+
+ /**
+ * Ověří výběr požadovaných podakcí.
+ *
+ * @param Subevent[] $args
+ */
+ public function validateSubeventsRequired(MultiSelectBox $field, array $args): bool
+ {
+ $selectedSubevents = $this->subeventRepository->findSubeventsByIds($field->getValue());
+ $testSubevent = $args[0];
+
+ return $this->validators->validateSubeventsRequired($selectedSubevents, $testSubevent);
+ }
+
+ /**
+ * Ověří kompatibilitu rolí.
+ *
+ * @param Role[] $args
+ */
+ public function validateRolesIncompatible(MultiSelectBox $field, array $args): bool
+ {
+ $selectedRoles = $this->roleRepository->findRolesByIds($field->getValue());
+ $testRole = $args[0];
+
+ return $this->validators->validateRolesIncompatible($selectedRoles, $testRole);
+ }
+
+ /**
+ * Ověří výběr požadovaných rolí.
+ *
+ * @param Role[] $args
+ */
+ public function validateRolesRequired(MultiSelectBox $field, array $args): bool
+ {
+ $selectedRoles = $this->roleRepository->findRolesByIds($field->getValue());
+ $testRole = $args[0];
+
+ return $this->validators->validateRolesRequired($selectedRoles, $testRole);
+ }
+
+ /**
+ * Ověří registrovatelnost rolí.
+ */
+ public function validateRolesRegisterable(MultiSelectBox $field): bool
+ {
+ $selectedRoles = $this->roleRepository->findRolesByIds($field->getValue());
+
+ return $this->validators->validateRolesRegisterable($selectedRoles, $this->user);
+ }
+
+ /**
+ * Ověří požadovaný minimální věk.
+ *
+ * @throws SettingsItemNotFoundException
+ * @throws Throwable
+ */
+ public function validateRolesMinimumAge(MultiSelectBox $field): bool
+ {
+ $selectedRoles = $this->roleRepository->findRolesByIds($field->getValue());
+
+ return $this->validators->validateRolesMinimumAge($selectedRoles, $this->user);
+ }
+
+ /**
+ * Přepíná povinnost podakcí podle kombinace rolí.
+
+ * @param int[] $rolesWithSubevents
+ */
+ public static function toggleSubeventsRequired(MultiSelectBox $field, array $rolesWithSubevents): bool
+ {
+ foreach ($field->getValue() as $roleId) {
+ if (in_array($roleId, $rolesWithSubevents)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Přepíná povinnost vlastních polí podle kombinace rolí.
+ *
+ * @param array
$customInput
+ */
+ public static function toggleCustomInputRequired(MultiSelectBox $field, array $customInput): bool
+ {
+ foreach ($field->getValue() as $roleId) {
+ if (in_array($roleId, $customInput['roles'])) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Přepíná zobrazení vlastních polí podle kombinace rolí.
+ * Je nutná, na výsledku nezáleží (používá se javascript funkce).
+ *
+ * @param int[] $customInputRoles
+ */
+ public static function toggleCustomInputVisibility(MultiSelectBox $field, array $customInputRoles): bool
+ {
+ return false;
+ }
+}
diff --git a/app/WebModule/Presenters/PagePresenter.php b/app/WebModule/Presenters/PagePresenter.php
index 6c56480f2..81fb676ba 100644
--- a/app/WebModule/Presenters/PagePresenter.php
+++ b/app/WebModule/Presenters/PagePresenter.php
@@ -5,6 +5,7 @@
namespace App\WebModule\Presenters;
use App\WebModule\Components\ApplicationContentControl;
+use App\WebModule\Components\ApplicationGroupContentControl;
use App\WebModule\Components\BlocksContentControl;
use App\WebModule\Components\CapacitiesContentControl;
use App\WebModule\Components\ContactFormContentControl;
@@ -12,6 +13,7 @@
use App\WebModule\Components\FaqContentControl;
use App\WebModule\Components\HtmlContentControl;
use App\WebModule\Components\IApplicationContentControlFactory;
+use App\WebModule\Components\IApplicationGroupContentControlFactory;
use App\WebModule\Components\IBlocksContentControlFactory;
use App\WebModule\Components\ICapacitiesContentControlFactory;
use App\WebModule\Components\IContactFormContentControlFactory;
@@ -50,6 +52,9 @@ class PagePresenter extends WebBasePresenter
#[Inject]
public IApplicationContentControlFactory $applicationContentControlFactory;
+ #[Inject]
+ public IApplicationGroupContentControlFactory $applicationGroupContentControlFactory;
+
#[Inject]
public IBlocksContentControlFactory $blocksContentControlFactory;
@@ -137,6 +142,11 @@ protected function createComponentApplicationContent(): ApplicationContentContro
return $this->applicationContentControlFactory->create();
}
+ protected function createComponentApplicationGroupContent(): ApplicationGroupContentControl
+ {
+ return $this->applicationGroupContentControlFactory->create();
+ }
+
protected function createComponentBlocksContent(): BlocksContentControl
{
return $this->blocksContentControlFactory->create();
diff --git a/app/lang/admin.cs_CZ.neon b/app/lang/admin.cs_CZ.neon
index 1b4de5a09..f91cc7191 100644
--- a/app/lang/admin.cs_CZ.neon
+++ b/app/lang/admin.cs_CZ.neon
@@ -40,6 +40,7 @@ menu:
payments: "Platby"
acl: "Role"
mailing: "Mailing"
+ groups: "Skupiny"
configuration: "Nastavení"
help: "Nápověda"
@@ -631,6 +632,25 @@ mailing:
recipient_emails: "Příjemci - e-maily"
automatic: "Automatický"
+groups:
+ menu:
+ statuses: "Statusy"
+ groups: "Skupiny"
+
+ status:
+ heading: "Statusy"
+
+ group:
+ heading: "Skupiny"
+
+ column:
+ name: "Název"
+ group_status: "Status"
+ leader_name: "Jméno vedoucího"
+ leader_email: "Email vedoucího"
+ places: "Počet míst"
+ price: "Cena"
+
configuration:
menu:
seminar: "Seminář"
@@ -641,6 +661,7 @@ configuration:
place: "Místo"
mailing: "Mailing"
skautis: "SkautIS"
+ group: "Skupinová registrace"
web: "Web"
system: "Systém"
subevents: "Podakce"