diff --git a/bundle/Controller/Admin/Export/Export.php b/bundle/Controller/Admin/Export/Export.php index fc442760..79d98382 100644 --- a/bundle/Controller/Admin/Export/Export.php +++ b/bundle/Controller/Admin/Export/Export.php @@ -3,12 +3,12 @@ namespace Netgen\Bundle\InformationCollectionBundle\Controller\Admin\Export; use eZ\Publish\Core\MVC\Symfony\Security\Authorization\Attribute; +use Netgen\Bundle\InformationCollectionBundle\Form\ExportType; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Netgen\InformationCollection\API\Value\Export\ExportCriteria; use Netgen\InformationCollection\API\Service\Exporter; use Netgen\InformationCollection\Core\Export\ExportResponseFormatterRegistry; use Symfony\Component\HttpFoundation\Request; -use Netgen\InformationCollection\Form\Type\ExportType; use eZ\Publish\API\Repository\ContentService; final class Export extends AbstractController diff --git a/bundle/Controller/Admin/TreeController.php b/bundle/Controller/Admin/TreeController.php index 575e9cec..afba5da5 100644 --- a/bundle/Controller/Admin/TreeController.php +++ b/bundle/Controller/Admin/TreeController.php @@ -120,7 +120,7 @@ protected function getCollections(Content $content, $isRoot = false) return array( 'id' => $content->getContent()->id, 'parent' => $isRoot ? '#' : '0', - 'text' => $content->getContent()->getName($languages[0]) . ' (' . strval($count->getCount()) . ')', + 'text' => $content->getContent()->getName(in_array($languages[0], $content->getContent()->getVersionInfo()->languageCodes) ? $languages[0] : null) . ' (' . strval($count->getCount()) . ')', 'children' => false, 'a_attr' => array( 'href' => $this->router->generate('netgen_information_collection.route.admin.collection_list', ['contentId' => $content->getContent()->id]), diff --git a/bundle/DependencyInjection/NetgenInformationCollectionExtension.php b/bundle/DependencyInjection/NetgenInformationCollectionExtension.php index f36e19d5..ef4c0d24 100644 --- a/bundle/DependencyInjection/NetgenInformationCollectionExtension.php +++ b/bundle/DependencyInjection/NetgenInformationCollectionExtension.php @@ -42,6 +42,8 @@ public function load(array $configs, ContainerBuilder $container) $libResourceLoader->load('services.yml'); $libResourceLoader->load('parameters.yml'); $libResourceLoader->load('default_settings.yml'); + $libResourceLoader->load('email_data_providers.yml'); + $libResourceLoader->load('mailers.yml'); $this->processSemanticConfig($container, $config); diff --git a/bundle/EzPlatform/RepositoryForms/InformationCollectionMapper.php b/bundle/EzPlatform/RepositoryForms/InformationCollectionMapper.php index 9cb45293..e3800cfb 100644 --- a/bundle/EzPlatform/RepositoryForms/InformationCollectionMapper.php +++ b/bundle/EzPlatform/RepositoryForms/InformationCollectionMapper.php @@ -26,7 +26,7 @@ final class InformationCollectionMapper */ public function mapToFormData(Content $content, Location $location, ContentType $contentType) { - $fields = $content->getFieldsByLanguage($content->contentInfo->mainLanguageCode); + $fields = $content->getFieldsByLanguage(); $informationCollectionFields = []; diff --git a/bundle/EzPlatform/RepositoryForms/InformationCollectionType.php b/bundle/EzPlatform/RepositoryForms/InformationCollectionType.php index ad00102e..815ac2cc 100644 --- a/bundle/EzPlatform/RepositoryForms/InformationCollectionType.php +++ b/bundle/EzPlatform/RepositoryForms/InformationCollectionType.php @@ -48,6 +48,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) foreach ($struct->getFieldsData() as $fieldsDatum) { $builder->add($fieldsDatum->fieldDefinition->identifier, InformationCollectionFieldType::class, [ + //'label' => false, 'languageCode' => $options['languageCode'], 'mainLanguageCode' => $options['mainLanguageCode'], ]); diff --git a/bundle/Listener/CaptchaValidationListener.php b/bundle/Listener/CaptchaValidationListener.php index 2e93b1ad..f147ec63 100644 --- a/bundle/Listener/CaptchaValidationListener.php +++ b/bundle/Listener/CaptchaValidationListener.php @@ -50,8 +50,11 @@ public function onPostSubmit(FormEvent $event) ->getConfig() ->getOption('captcha_value'); -// $request = $this->requestStack->getCurrentRequest(); - $request = Request::createFromGlobals(); + $request = $this->requestStack->getCurrentRequest(); +// $request = Request::createFromGlobals(); + + $submittedHostName = $request->getHost(); + $captchaValue->getInnerCaptcha()->setExpectedHostname($submittedHostName); $text = 'The captcha is invalid. Please try again.'; diff --git a/bundle/Resources/config/services.yml b/bundle/Resources/config/services.yml index b637a4ec..6b97e252 100644 --- a/bundle/Resources/config/services.yml +++ b/bundle/Resources/config/services.yml @@ -32,3 +32,9 @@ services: - '@request_stack' - '@netgen_information_collection.captcha.service' - '@translator' + + Netgen\InformationCollection\API\Service\CaptchaService: + alias: Netgen\InformationCollection\Core\Service\CaptchaService + + eZ\Publish\Core\Helper\TranslationHelper: + alias: ezpublish.translation_helper diff --git a/bundle/Resources/views/admin/content_fields.html.twig b/bundle/Resources/views/admin/content_fields.html.twig index a35f67be..1d9b0006 100644 --- a/bundle/Resources/views/admin/content_fields.html.twig +++ b/bundle/Resources/views/admin/content_fields.html.twig @@ -10,7 +10,7 @@ {% block ezboolean_field %} {% apply spaceless %} {% set field_value = attribute.value %} - {% if field_value %} + {% if field_value.dataInt %} {{ 'field_value.yes'|trans }} {% else %} {{ 'field_value.no'|trans }} @@ -18,6 +18,14 @@ {% endapply %} {% endblock %} +{% block enhancedezbinaryfile_field %} + {% apply spaceless %} + + Download + + {% endapply %} +{% endblock %} + {% block default_field %} {% apply spaceless %} {{ attribute.value }} diff --git a/bundle/Resources/views/admin/view.html.twig b/bundle/Resources/views/admin/view.html.twig index fad83a99..a1d0eddb 100644 --- a/bundle/Resources/views/admin/view.html.twig +++ b/bundle/Resources/views/admin/view.html.twig @@ -32,7 +32,7 @@