Skip to content
Open

3.x #102

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions bundle/Form/CaptchaType.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Netgen\Bundle\InformationCollectionBundle\Form;

use Netgen\Bundle\InformationCollectionBundle\Listener\CaptchaValidationListener;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormInterface;
Expand All @@ -11,11 +10,9 @@

class CaptchaType extends AbstractType
{
private CaptchaValidationListener $validationListener;

public function __construct(CaptchaValidationListener $validationListener)
public function __construct()
{
$this->validationListener = $validationListener;
}

public function buildView(FormView $view, FormInterface $form, array $options): void
Expand All @@ -29,7 +26,6 @@ public function buildView(FormView $view, FormInterface $form, array $options):

public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->addEventSubscriber($this->validationListener);
}

public function configureOptions(OptionsResolver $resolver): void
Expand Down
57 changes: 0 additions & 57 deletions bundle/Listener/CaptchaValidationListener.php

This file was deleted.

8 changes: 0 additions & 8 deletions bundle/Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,3 @@ services:
- '@Ibexa\Core\Helper\TranslationHelper'
tags:
- { name: data_collector, template: '@NetgenInformationCollection/data_collector/template.html.twig', id: 'netgen_information_collection_collector' }


netgen_information_collection.listener.captcha_validation:
class: Netgen\Bundle\InformationCollectionBundle\Listener\CaptchaValidationListener
arguments:
- '@request_stack'
- '@netgen_information_collection.captcha.service'
- '@translator'
2 changes: 1 addition & 1 deletion lib/Core/Service/CaptchaService.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function getCaptcha(Location $location): CaptchaValue

if (!empty($config['options'])) {
// if (!empty($config['options']['hostname'])) {
$reCaptcha->setExpectedHostname('localhost');
// $reCaptcha->setExpectedHostname('localhost');
// }
// if (!empty($config['options']['apk_package_name'])) {
// $reCaptcha->setExpectedApkPackageName($config['options']['apk_package_name']);
Expand Down
2 changes: 0 additions & 2 deletions lib/Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ services:

netgen_information_collection.form.captcha_type:
class: Netgen\Bundle\InformationCollectionBundle\Form\CaptchaType
arguments:
- '@netgen_information_collection.listener.captcha_validation'
tags:
- { name: form.type }

Expand Down