mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 14:03:27 +00:00
PHRAS-3426_translations-ignored_MASTER
- fix : crashed when @Ignore annotation was used in form item - fix : translate "help_message"s from forms - fix : replace many "string-typed" form elements by "type::class" dump translations (4 new strings)
This commit is contained in:
@@ -11,16 +11,17 @@
|
|||||||
|
|
||||||
namespace Alchemy\Phrasea\Command\Developer\Utils;
|
namespace Alchemy\Phrasea\Command\Developer\Utils;
|
||||||
|
|
||||||
|
use Doctrine\Common\Annotations\DocParser;
|
||||||
|
use JMS\TranslationBundle\Annotation\Desc;
|
||||||
|
use JMS\TranslationBundle\Annotation\Ignore;
|
||||||
|
use JMS\TranslationBundle\Annotation\Meaning;
|
||||||
use JMS\TranslationBundle\Exception\RuntimeException;
|
use JMS\TranslationBundle\Exception\RuntimeException;
|
||||||
use JMS\TranslationBundle\Logger\LoggerAwareInterface;
|
use JMS\TranslationBundle\Logger\LoggerAwareInterface;
|
||||||
use JMS\TranslationBundle\Model\FileSource;
|
use JMS\TranslationBundle\Model\FileSource;
|
||||||
use JMS\TranslationBundle\Model\Message;
|
use JMS\TranslationBundle\Model\Message;
|
||||||
use JMS\TranslationBundle\Annotation\Meaning;
|
|
||||||
use JMS\TranslationBundle\Annotation\Desc;
|
|
||||||
use JMS\TranslationBundle\Annotation\Ignore;
|
|
||||||
use Doctrine\Common\Annotations\DocParser;
|
|
||||||
use JMS\TranslationBundle\Model\MessageCatalogue;
|
use JMS\TranslationBundle\Model\MessageCatalogue;
|
||||||
use JMS\TranslationBundle\Translation\Extractor\FileVisitorInterface;
|
use JMS\TranslationBundle\Translation\Extractor\FileVisitorInterface;
|
||||||
|
use PhpParser\Comment\Doc;
|
||||||
use PHPParser\Node;
|
use PHPParser\Node;
|
||||||
use PHPParser\Node\Expr\Array_;
|
use PHPParser\Node\Expr\Array_;
|
||||||
use PHPParser\Node\Scalar\String_;
|
use PHPParser\Node\Scalar\String_;
|
||||||
@@ -94,7 +95,8 @@ class HelpMessageExtractor implements FileVisitorInterface, NodeVisitor, LoggerA
|
|||||||
$docComment = $item->key->getDocComment();
|
$docComment = $item->key->getDocComment();
|
||||||
$docComment = $docComment ? $docComment : $item->value->getDocComment();
|
$docComment = $docComment ? $docComment : $item->value->getDocComment();
|
||||||
if ($docComment) {
|
if ($docComment) {
|
||||||
foreach ($this->docParser->parse($docComment, 'file '.$this->file.' near line '.$item->value->getLine()) as $annot) {
|
/** @var Doc $docComment */
|
||||||
|
foreach ($this->docParser->parse($docComment->getText(), 'file '.$this->file.' near line '.$item->value->getLine()) as $annot) {
|
||||||
if ($annot instanceof Ignore) {
|
if ($annot instanceof Ignore) {
|
||||||
$ignore = true;
|
$ignore = true;
|
||||||
} elseif ($annot instanceof Desc) {
|
} elseif ($annot instanceof Desc) {
|
||||||
|
@@ -11,29 +11,40 @@
|
|||||||
|
|
||||||
namespace Alchemy\Phrasea\Form\Configuration;
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use JMS\TranslationBundle\Annotation\Ignore;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Translation\TranslatorInterface;
|
||||||
|
|
||||||
class APIClientsFormType extends AbstractType
|
class APIClientsFormType extends AbstractType
|
||||||
{
|
{
|
||||||
|
/** @var TranslatorInterface */
|
||||||
|
private $translator;
|
||||||
|
|
||||||
|
public function __construct(TranslatorInterface $translator)
|
||||||
|
{
|
||||||
|
$this->translator = $translator;
|
||||||
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder->add('api-enabled', 'checkbox', [
|
$builder->add('api-enabled', CheckboxType::class, [
|
||||||
'label' => 'Enable Phraseanet Web API',
|
'label' => 'Enable Phraseanet Web API',
|
||||||
'help_message' => 'The Phraseanet Web API allows other web application to rely on this instance'
|
'help_message' => /** @Ignore */ $this->translator->trans('The Phraseanet Web API allows other web application to rely on this instance')
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder->add('navigator-enabled', 'checkbox', [
|
$builder->add('navigator-enabled', CheckboxType::class, [
|
||||||
'label' => 'Authorize *Phraseanet Navigator*',
|
'label' => 'Authorize *Phraseanet Navigator*',
|
||||||
'help_message' => '*Phraseanet Navigator* is a smartphone application that allow user to connect on this instance',
|
'help_message' => /** @Ignore */ $this->translator->trans('*Phraseanet Navigator* is a smartphone application that allow user to connect on this instance'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder->add('office-enabled', 'checkbox', [
|
$builder->add('office-enabled', CheckboxType::class, [
|
||||||
'label' => 'Authorize Microsoft Office Plugin to connect.',
|
'label' => /** @Ignore */ $this->translator->trans('Authorize Microsoft Office Plugin to connect.'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder->add('adobe_cc-enabled', 'checkbox', [
|
$builder->add('adobe_cc-enabled', CheckboxType::class, [
|
||||||
'label' => 'Authorize Adobe cc Plugin to connect.',
|
'label' => /** @Ignore */ $this->translator->trans('Authorize Adobe cc Plugin to connect.'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -11,53 +11,66 @@
|
|||||||
|
|
||||||
namespace Alchemy\Phrasea\Form\Configuration;
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use JMS\TranslationBundle\Annotation\Ignore;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Translation\TranslatorInterface;
|
||||||
|
|
||||||
class ActionsFormType extends AbstractType
|
class ActionsFormType extends AbstractType
|
||||||
{
|
{
|
||||||
|
/** @var TranslatorInterface */
|
||||||
|
private $translator;
|
||||||
|
|
||||||
|
public function __construct(TranslatorInterface $translator)
|
||||||
|
{
|
||||||
|
$this->translator = $translator;
|
||||||
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder->add('download-max-size', 'integer', [
|
$builder->add('download-max-size', IntegerType::class, [
|
||||||
'label' => 'Maximum megabytes allowed for download',
|
'label' => 'Maximum megabytes allowed for download',
|
||||||
'help_message' => 'If request is bigger, then mail is still available',
|
'help_message' => /** @Ignore */ $this->translator->trans('If request is bigger, then mail is still available'),
|
||||||
]);
|
]);
|
||||||
$builder->add('validation-reminder-time-left-percent', 'integer', [
|
$builder->add('validation-reminder-time-left-percent', IntegerType::class, [
|
||||||
'label' => 'Percent of the time left before the end of the validation to send a reminder email',
|
'label' => 'Percent of the time left before the end of the validation to send a reminder email',
|
||||||
]);
|
]);
|
||||||
$builder->add('validation-expiration-days', 'integer', [
|
$builder->add('validation-expiration-days', IntegerType::class, [
|
||||||
'label' => 'Default validation links duration',
|
'label' => 'Default validation links duration',
|
||||||
'help_message' => 'If set to 0, duration is permanent',
|
'help_message' => /** @Ignore */ $this->translator->trans('If set to 0, duration is permanent'),
|
||||||
]);
|
]);
|
||||||
$builder->add('auth-required-for-export', 'checkbox', [
|
$builder->add('auth-required-for-export', CheckboxType::class, [
|
||||||
'label' => 'Require authentication to download documents',
|
'label' => 'Require authentication to download documents',
|
||||||
'help_message' => 'Used for guest account',
|
'help_message' => /** @Ignore */ $this->translator->trans('Used for guest account'),
|
||||||
]);
|
]);
|
||||||
$builder->add('tou-validation-required-for-export', 'checkbox', [
|
$builder->add('tou-validation-required-for-export', CheckboxType::class, [
|
||||||
'label' => 'Users must accept Terms of Use for each export',
|
'label' => 'Users must accept Terms of Use for each export',
|
||||||
]);
|
]);
|
||||||
$builder->add('export-title-choice', 'checkbox', [
|
$builder->add('export-title-choice', CheckboxType::class, [
|
||||||
'label' => 'Choose the title of the document to export',
|
'label' => 'Choose the title of the document to export',
|
||||||
]);
|
]);
|
||||||
$builder->add('default-export-title', 'choice', [
|
$builder->add('default-export-title', ChoiceType::class, [
|
||||||
'label' => 'Default export title',
|
'label' => 'Default export title',
|
||||||
'choices' => ['title' => 'Document title', 'original' => 'Original name'],
|
'choices' => ['title' => 'Document title', 'original' => 'Original name'],
|
||||||
]);
|
]);
|
||||||
$builder->add('social-tools', 'choice', [
|
$builder->add('social-tools', ChoiceType::class, [
|
||||||
'label' => 'Enable this setting to share on Facebook and Twitter',
|
'label' => 'Enable this setting to share on Facebook and Twitter',
|
||||||
'choices' => ['none' => 'Disabled', 'publishers' => 'Publishers', 'all' => 'Enabled'],
|
'choices' => ['none' => 'Disabled', 'publishers' => 'Publishers', 'all' => 'Enabled'],
|
||||||
]);
|
]);
|
||||||
$builder->add('enable-push-authentication', 'checkbox', [
|
$builder->add('enable-push-authentication', CheckboxType::class, [
|
||||||
'label' => 'Enable Forcing authentication to see push content',
|
'label' => 'Enable Forcing authentication to see push content',
|
||||||
'help_message' => 'Adds an option to the push form submission to restrict push recipient(s) to Phraseanet users only.',
|
'help_message' => /** @Ignore */ $this->translator->trans('Adds an option to the push form submission to restrict push recipient(s) to Phraseanet users only.'),
|
||||||
]);
|
]);
|
||||||
$builder->add('force-push-authentication', 'checkbox', [
|
$builder->add('force-push-authentication', CheckboxType::class, [
|
||||||
'label' => 'Disallow the possibility for the end user to disable push authentication',
|
'label' => 'Disallow the possibility for the end user to disable push authentication',
|
||||||
]);
|
]);
|
||||||
$builder->add('enable-feed-notification', 'checkbox', [
|
$builder->add('enable-feed-notification', CheckboxType::class, [
|
||||||
'label' => 'Enable possibility to notify users when publishing a new feed entry',
|
'label' => 'Enable possibility to notify users when publishing a new feed entry',
|
||||||
]);
|
]);
|
||||||
$builder->add('download-link-validity', 'integer', [
|
$builder->add('download-link-validity', IntegerType::class, [
|
||||||
'label' => 'Validity period of the download links',
|
'label' => 'Validity period of the download links',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@@ -11,13 +11,18 @@
|
|||||||
namespace Alchemy\Phrasea\Form\Configuration;
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\UrlType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
||||||
class CustomLinkFormType extends AbstractType
|
class CustomLinkFormType extends AbstractType
|
||||||
{
|
{
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder->add('linkName', 'text', [
|
$builder->add('linkName', TextType::class, [
|
||||||
'label' => false,
|
'label' => false,
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'placeholder' => 'setup::custom-link:name-link',
|
'placeholder' => 'setup::custom-link:name-link',
|
||||||
@@ -25,7 +30,7 @@ class CustomLinkFormType extends AbstractType
|
|||||||
'maxlength' => "30"
|
'maxlength' => "30"
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
$builder->add('linkLanguage', 'choice', [
|
$builder->add('linkLanguage', ChoiceType::class, [
|
||||||
'label' => false,
|
'label' => false,
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'required' => true
|
'required' => true
|
||||||
@@ -41,14 +46,14 @@ class CustomLinkFormType extends AbstractType
|
|||||||
'du' => 'DU'
|
'du' => 'DU'
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
$builder->add('linkUrl', 'url', [
|
$builder->add('linkUrl', UrlType::class, [
|
||||||
'label' => false,
|
'label' => false,
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'placeholder' => 'setup::custom-link:placeholder-link-url',
|
'placeholder' => 'setup::custom-link:placeholder-link-url',
|
||||||
'required' => true
|
'required' => true
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
$builder->add('linkLocation', 'choice', [
|
$builder->add('linkLocation', ChoiceType::class, [
|
||||||
'label' => false,
|
'label' => false,
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'required' => true
|
'required' => true
|
||||||
@@ -59,13 +64,13 @@ class CustomLinkFormType extends AbstractType
|
|||||||
'navigation-bar' => 'setup::custom-link:navigation-bar',
|
'navigation-bar' => 'setup::custom-link:navigation-bar',
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
$builder->add('linkOrder', 'integer', [
|
$builder->add('linkOrder', IntegerType::class, [
|
||||||
'label' => false,
|
'label' => false,
|
||||||
]);
|
]);
|
||||||
$builder->add('linkBold', 'checkbox', [
|
$builder->add('linkBold', CheckboxType::class, [
|
||||||
'label' => false,
|
'label' => false,
|
||||||
]);
|
]);
|
||||||
$builder->add('linkColor', 'choice', [
|
$builder->add('linkColor', ChoiceType::class, [
|
||||||
'label' => false,
|
'label' => false,
|
||||||
'choices' => [
|
'choices' => [
|
||||||
'' => '#ad0800',
|
'' => '#ad0800',
|
||||||
|
@@ -12,44 +12,48 @@
|
|||||||
namespace Alchemy\Phrasea\Form\Configuration;
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
||||||
class EmailFormType extends AbstractType
|
class EmailFormType extends AbstractType
|
||||||
{
|
{
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder->add('emitter-email', 'text', [
|
$builder->add('emitter-email', TextType::class, [
|
||||||
'label' => 'Default mail sender address',
|
'label' => 'Default mail sender address',
|
||||||
]);
|
]);
|
||||||
$builder->add('prefix', 'text', [
|
$builder->add('prefix', TextType::class, [
|
||||||
'label' => 'Prefix for notification emails',
|
'label' => 'Prefix for notification emails',
|
||||||
]);
|
]);
|
||||||
$builder->add('smtp-enabled', 'checkbox', [
|
$builder->add('smtp-enabled', CheckboxType::class, [
|
||||||
'label' => 'Use a SMTP server',
|
'label' => 'Use a SMTP server',
|
||||||
]);
|
]);
|
||||||
$builder->add('smtp-auth-enabled', 'checkbox', [
|
$builder->add('smtp-auth-enabled', CheckboxType::class, [
|
||||||
'label' => 'Enable SMTP authentication',
|
'label' => 'Enable SMTP authentication',
|
||||||
]);
|
]);
|
||||||
$builder->add('smtp-host', 'text', [
|
$builder->add('smtp-host', TextType::class, [
|
||||||
'label' => 'SMTP host',
|
'label' => 'SMTP host',
|
||||||
]);
|
]);
|
||||||
$builder->add('smtp-port', 'text', [
|
$builder->add('smtp-port', TextType::class, [
|
||||||
'label' => 'SMTP port',
|
'label' => 'SMTP port',
|
||||||
]);
|
]);
|
||||||
$builder->add('smtp-secure-mode', 'choice', [
|
$builder->add('smtp-secure-mode', ChoiceType::class, [
|
||||||
'label' => 'SMTP encryption',
|
'label' => 'SMTP encryption',
|
||||||
'choices' => ['none' => 'None', 'ssl' => 'SSL', 'tls' => 'TLS'],
|
'choices' => ['none' => 'None', 'ssl' => 'SSL', 'tls' => 'TLS'],
|
||||||
]);
|
]);
|
||||||
$builder->add('smtp-user', 'text', [
|
$builder->add('smtp-user', TextType::class, [
|
||||||
'label' => 'SMTP user',
|
'label' => 'SMTP user',
|
||||||
]);
|
]);
|
||||||
$builder->add('hidden-password', 'password', [
|
$builder->add('hidden-password', PasswordType::class, [
|
||||||
'label' => '',
|
'label' => '',
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'style' => 'display:none'
|
'style' => 'display:none'
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
$builder->add('smtp-password', 'password', [
|
$builder->add('smtp-password', PasswordType::class, [
|
||||||
'label' => 'SMTP password',
|
'label' => 'SMTP password',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@@ -11,12 +11,18 @@
|
|||||||
|
|
||||||
namespace Alchemy\Phrasea\Form\Configuration;
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use JMS\TranslationBundle\Annotation\Ignore;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\Translation\TranslatorInterface;
|
use Symfony\Component\Translation\TranslatorInterface;
|
||||||
|
|
||||||
class ExecutablesFormType extends AbstractType
|
class ExecutablesFormType extends AbstractType
|
||||||
{
|
{
|
||||||
|
/** @var TranslatorInterface */
|
||||||
private $translator;
|
private $translator;
|
||||||
|
|
||||||
public function __construct(TranslatorInterface $translator)
|
public function __construct(TranslatorInterface $translator)
|
||||||
@@ -26,38 +32,37 @@ class ExecutablesFormType extends AbstractType
|
|||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder->add('h264-streaming-enabled', 'checkbox', [
|
$builder->add('h264-streaming-enabled', CheckboxType::class, [
|
||||||
'label' => 'Enable H264 stream mode',
|
'label' => 'Enable H264 stream mode',
|
||||||
'help_message' => 'Use with mod_token. Attention requires the apache modules and mod_h264_streaming mod_auth_token',
|
'help_message' => /** @Ignore */ $this->translator->trans('Use with mod_token. Attention requires the apache modules and mod_h264_streaming mod_auth_token'),
|
||||||
]);
|
]);
|
||||||
$builder->add('auth-token-directory', 'text', [
|
$builder->add('auth-token-directory', TextType::class, [
|
||||||
'label' => 'Auth_token mount point',
|
'label' => 'Auth_token mount point',
|
||||||
]);
|
]);
|
||||||
$builder->add('auth-token-directory-path', 'text', [
|
$builder->add('auth-token-directory-path', TextType::class, [
|
||||||
'label' => 'Auth_token directory path',
|
'label' => 'Auth_token directory path',
|
||||||
]);
|
]);
|
||||||
$builder->add('auth-token-passphrase', 'text', [
|
$builder->add('auth-token-passphrase', TextType::class, [
|
||||||
'label' => 'Auth_token passphrase',
|
'label' => 'Auth_token passphrase',
|
||||||
'help_message' => 'Defined in Apache configuration',
|
'help_message' => /** @Ignore */ $this->translator->trans('Defined in Apache configuration'),
|
||||||
]);
|
]);
|
||||||
$builder->add('php-conf-path', 'text', [
|
$builder->add('php-conf-path', TextType::class, [
|
||||||
'label' => 'php.ini path',
|
'label' => 'php.ini path',
|
||||||
'help_message' => 'Empty if not used',
|
'help_message' => /** @Ignore */ $this->translator->trans('Empty if not used'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$imagineDoc = '<a href="http://imagine.readthedocs.org/en/latest/usage/introduction.html">http://imagine.readthedocs.org/en/latest/usage/introduction.html</a>';
|
$imagineDoc = '<a href="http://imagine.readthedocs.org/en/latest/usage/introduction.html">http://imagine.readthedocs.org/en/latest/usage/introduction.html</a>';
|
||||||
|
|
||||||
$builder->add('imagine-driver', 'choice', [
|
$builder->add('imagine-driver', ChoiceType::class, [
|
||||||
'label' => $this->translator->trans('Imagine driver'),
|
'label' => 'Imagine driver',
|
||||||
'help_message' => /** @Ignore */ $this->translator->trans('See documentation at %url%', ['%url%' => $imagineDoc]),
|
'help_message' => /** @Ignore */ $this->translator->trans('See documentation at %url%', ['%url%' => $imagineDoc]),
|
||||||
'choices' => ['' => 'Auto', 'gmagick' => 'GraphicsMagick', 'imagick' => 'ImageMagick', 'gd' => 'GD'],
|
'choices' => ['' => 'Auto', 'gmagick' => 'GraphicsMagick', 'imagick' => 'ImageMagick', 'gd' => 'GD'],
|
||||||
'translation_domain' => false
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder->add('ffmpeg-threads', 'integer', [
|
$builder->add('ffmpeg-threads', IntegerType::class, [
|
||||||
'label' => 'Number of threads to use for FFMpeg',
|
'label' => 'Number of threads to use for FFMpeg',
|
||||||
]);
|
]);
|
||||||
$builder->add('pdf-max-pages', 'integer', [
|
$builder->add('pdf-max-pages', IntegerType::class, [
|
||||||
'label' => 'Maximum number of pages to be extracted from PDF',
|
'label' => 'Maximum number of pages to be extracted from PDF',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@@ -11,20 +11,31 @@
|
|||||||
|
|
||||||
namespace Alchemy\Phrasea\Form\Configuration;
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use JMS\TranslationBundle\Annotation\Ignore;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Translation\TranslatorInterface;
|
||||||
|
|
||||||
class FtpExportFormType extends AbstractType
|
class FtpExportFormType extends AbstractType
|
||||||
{
|
{
|
||||||
|
/** @var TranslatorInterface */
|
||||||
|
private $translator;
|
||||||
|
|
||||||
|
public function __construct(TranslatorInterface $translator)
|
||||||
|
{
|
||||||
|
$this->translator = $translator;
|
||||||
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder->add('ftp-enabled', 'checkbox', [
|
$builder->add('ftp-enabled', CheckboxType::class, [
|
||||||
'label' => 'Enable FTP export',
|
'label' => 'Enable FTP export',
|
||||||
'help_message' => 'Available in multi-export tab',
|
'help_message' => /** @Ignore */ $this->translator->trans('Available in multi-export tab'),
|
||||||
]);
|
]);
|
||||||
$builder->add('ftp-user-access', 'checkbox', [
|
$builder->add('ftp-user-access', CheckboxType::class, [
|
||||||
'label' => 'Enable FTP for users',
|
'label' => 'Enable FTP for users',
|
||||||
'help_message' => 'By default it is available for admins',
|
'help_message' => /** @Ignore */ $this->translator->trans('By default it is available for admins'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -12,6 +12,11 @@
|
|||||||
namespace Alchemy\Phrasea\Form\Configuration;
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\Validator\Constraints\GreaterThanOrEqual;
|
use Symfony\Component\Validator\Constraints\GreaterThanOrEqual;
|
||||||
|
|
||||||
@@ -26,28 +31,28 @@ class GeneralFormType extends AbstractType
|
|||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder->add('title', 'text', [
|
$builder->add('title', TextType::class, [
|
||||||
'label' => 'Application title',
|
'label' => 'Application title',
|
||||||
]);
|
]);
|
||||||
$builder->add('keywords', 'text', [
|
$builder->add('keywords', TextType::class, [
|
||||||
'label' => 'Keywords used for indexing purposes by search engines robots',
|
'label' => 'Keywords used for indexing purposes by search engines robots',
|
||||||
]);
|
]);
|
||||||
$builder->add('description', 'textarea', [
|
$builder->add('description', TextareaType::class, [
|
||||||
'label' => 'Application description',
|
'label' => 'Application description',
|
||||||
]);
|
]);
|
||||||
$builder->add('analytics', 'text', [
|
$builder->add('analytics', TextType::class, [
|
||||||
'label' => 'Google Analytics identifier',
|
'label' => 'Google Analytics identifier',
|
||||||
]);
|
]);
|
||||||
$builder->add('matomo-analytics-url', 'text', [
|
$builder->add('matomo-analytics-url', TextType::class, [
|
||||||
'label' => 'Matomo Analytics url',
|
'label' => 'Matomo Analytics url',
|
||||||
]);
|
]);
|
||||||
$builder->add('matomo-analytics-id', 'text', [
|
$builder->add('matomo-analytics-id', TextType::class, [
|
||||||
'label' => 'Matomo Analytics identifier',
|
'label' => 'Matomo Analytics identifier',
|
||||||
]);
|
]);
|
||||||
$builder->add('allow-indexation', 'checkbox', [
|
$builder->add('allow-indexation', CheckboxType::class, [
|
||||||
'label' => 'Allow the website to be indexed by search engines like Google',
|
'label' => 'Allow the website to be indexed by search engines like Google',
|
||||||
]);
|
]);
|
||||||
$builder->add('home-presentation-mode', 'choice', [
|
$builder->add('home-presentation-mode', ChoiceType::class, [
|
||||||
'label' => 'Homepage slideshow',
|
'label' => 'Homepage slideshow',
|
||||||
'choices' => [
|
'choices' => [
|
||||||
'DISPLAYx1' => 'Single image',
|
'DISPLAYx1' => 'Single image',
|
||||||
@@ -57,7 +62,7 @@ class GeneralFormType extends AbstractType
|
|||||||
'GALLERIA' => 'Gallery',
|
'GALLERIA' => 'Gallery',
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
$builder->add('default-subdef-url-ttl', 'integer', [
|
$builder->add('default-subdef-url-ttl', IntegerType::class, [
|
||||||
'label' => 'Default TTL in seconds of sub-definition url',
|
'label' => 'Default TTL in seconds of sub-definition url',
|
||||||
'attr' => ['min' => -1],
|
'attr' => ['min' => -1],
|
||||||
'constraints' => new GreaterThanOrEqual(['value' => -1]),
|
'constraints' => new GreaterThanOrEqual(['value' => -1]),
|
||||||
|
@@ -12,10 +12,10 @@
|
|||||||
namespace Alchemy\Phrasea\Form\Configuration;
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||||
use Symfony\Component\Translation\TranslatorInterface;
|
use Symfony\Component\Translation\TranslatorInterface;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
|
|
||||||
|
|
||||||
class MainConfigurationFormType extends AbstractType
|
class MainConfigurationFormType extends AbstractType
|
||||||
{
|
{
|
||||||
@@ -33,22 +33,22 @@ class MainConfigurationFormType extends AbstractType
|
|||||||
$builder->add('general', new GeneralFormType($this->languages), [
|
$builder->add('general', new GeneralFormType($this->languages), [
|
||||||
'label' => 'General configuration',
|
'label' => 'General configuration',
|
||||||
]);
|
]);
|
||||||
$builder->add('modules', new ModulesFormType(), [
|
$builder->add('modules', new ModulesFormType($this->translator), [
|
||||||
'label' => 'Additionnal modules',
|
'label' => 'Additionnal modules',
|
||||||
]);
|
]);
|
||||||
$builder->add('actions', new ActionsFormType(), [
|
$builder->add('actions', new ActionsFormType($this->translator), [
|
||||||
'label' => 'Push configuration',
|
'label' => 'Push configuration',
|
||||||
]);
|
]);
|
||||||
$builder->add('ftp', new FtpExportFormType(), [
|
$builder->add('ftp', new FtpExportFormType($this->translator), [
|
||||||
'label' => 'FTP Export',
|
'label' => 'FTP Export',
|
||||||
]);
|
]);
|
||||||
$builder->add('registration', new RegistrationFormType(), [
|
$builder->add('registration', new RegistrationFormType($this->translator), [
|
||||||
'label' => 'Registration',
|
'label' => 'Registration',
|
||||||
]);
|
]);
|
||||||
$builder->add('maintenance', new MaintenanceFormType(), [
|
$builder->add('maintenance', new MaintenanceFormType(), [
|
||||||
'label' => 'Maintenance state',
|
'label' => 'Maintenance state',
|
||||||
]);
|
]);
|
||||||
$builder->add('api-clients', new APIClientsFormType(), [
|
$builder->add('api-clients', new APIClientsFormType($this->translator), [
|
||||||
'label' => 'Phraseanet client API',
|
'label' => 'Phraseanet client API',
|
||||||
]);
|
]);
|
||||||
$builder->add('webservices', new WebservicesFormType($this->translator), [
|
$builder->add('webservices', new WebservicesFormType($this->translator), [
|
||||||
@@ -57,7 +57,7 @@ class MainConfigurationFormType extends AbstractType
|
|||||||
$builder->add('executables', new ExecutablesFormType($this->translator), [
|
$builder->add('executables', new ExecutablesFormType($this->translator), [
|
||||||
'label' => 'Executables settings',
|
'label' => 'Executables settings',
|
||||||
]);
|
]);
|
||||||
$builder->add('searchengine', new SearchEngineFormType(), [
|
$builder->add('searchengine', new SearchEngineFormType($this->translator), [
|
||||||
'label' => 'Search engine',
|
'label' => 'Search engine',
|
||||||
]);
|
]);
|
||||||
$builder->add('email', new EmailFormType(), [
|
$builder->add('email', new EmailFormType(), [
|
||||||
|
@@ -12,16 +12,18 @@
|
|||||||
namespace Alchemy\Phrasea\Form\Configuration;
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
||||||
class MaintenanceFormType extends AbstractType
|
class MaintenanceFormType extends AbstractType
|
||||||
{
|
{
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder->add('message', 'text', [
|
$builder->add('message', TextType::class, [
|
||||||
'label' => 'Maintenance message',
|
'label' => 'Maintenance message',
|
||||||
]);
|
]);
|
||||||
$builder->add('enabled', 'checkbox', [
|
$builder->add('enabled', CheckboxType::class, [
|
||||||
'label' => 'Enable maintenance message broadcast',
|
'label' => 'Enable maintenance message broadcast',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@@ -11,28 +11,39 @@
|
|||||||
|
|
||||||
namespace Alchemy\Phrasea\Form\Configuration;
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use JMS\TranslationBundle\Annotation\Ignore;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Translation\TranslatorInterface;
|
||||||
|
|
||||||
class ModulesFormType extends AbstractType
|
class ModulesFormType extends AbstractType
|
||||||
{
|
{
|
||||||
|
/** @var TranslatorInterface */
|
||||||
|
private $translator;
|
||||||
|
|
||||||
|
public function __construct(TranslatorInterface $translator)
|
||||||
|
{
|
||||||
|
$this->translator = $translator;
|
||||||
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder->add('thesaurus', 'checkbox', [
|
$builder->add('thesaurus', CheckboxType::class, [
|
||||||
'label' => 'Enable thesaurus',
|
'label' => 'Enable thesaurus',
|
||||||
]);
|
]);
|
||||||
$builder->add('stories', 'checkbox', [
|
$builder->add('stories', CheckboxType::class, [
|
||||||
'label' => 'Enable multi-doc mode',
|
'label' => 'Enable multi-doc mode',
|
||||||
]);
|
]);
|
||||||
$builder->add('doc-substitution', 'checkbox', [
|
$builder->add('doc-substitution', CheckboxType::class, [
|
||||||
'label' => 'Enable HD substitution',
|
'label' => 'Enable HD substitution',
|
||||||
]);
|
]);
|
||||||
$builder->add('thumb-substitution', 'checkbox', [
|
$builder->add('thumb-substitution', CheckboxType::class, [
|
||||||
'label' => 'Enable thumbnail substitution',
|
'label' => 'Enable thumbnail substitution',
|
||||||
]);
|
]);
|
||||||
$builder->add('anonymous-report', 'checkbox', [
|
$builder->add('anonymous-report', CheckboxType::class, [
|
||||||
'label' => 'Anonymous report',
|
'label' => 'Anonymous report',
|
||||||
'help_message' => 'Hide information about users',
|
'help_message' => /** @Ignore */ $this->translator->trans('Hide information about users'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -11,13 +11,16 @@
|
|||||||
namespace Alchemy\Phrasea\Form\Configuration;
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\FileType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
||||||
class PersonalisationLogoFormType extends AbstractType
|
class PersonalisationLogoFormType extends AbstractType
|
||||||
{
|
{
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder->add('logoChoice', 'choice', [
|
$builder->add('logoChoice', ChoiceType::class, [
|
||||||
'label' => false,
|
'label' => false,
|
||||||
'choices' => [
|
'choices' => [
|
||||||
'original' => 'original logo',
|
'original' => 'original logo',
|
||||||
@@ -28,15 +31,15 @@ class PersonalisationLogoFormType extends AbstractType
|
|||||||
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder->add('personalizeLogoInput', 'file', [
|
$builder->add('personalizeLogoInput', FileType::class, [
|
||||||
'label' => false,
|
'label' => false,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder->add('personalizeFile', 'hidden', [
|
$builder->add('personalizeFile', HiddenType::class, [
|
||||||
'label' => false,
|
'label' => false,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder->add('fileType', 'hidden', [
|
$builder->add('fileType', HiddenType::class, [
|
||||||
'label' => false,
|
'label' => false,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@@ -11,18 +11,29 @@
|
|||||||
|
|
||||||
namespace Alchemy\Phrasea\Form\Configuration;
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use JMS\TranslationBundle\Annotation\Ignore;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Translation\TranslatorInterface;
|
||||||
|
|
||||||
class RegistrationFormType extends AbstractType
|
class RegistrationFormType extends AbstractType
|
||||||
{
|
{
|
||||||
|
/** @var TranslatorInterface */
|
||||||
|
private $translator;
|
||||||
|
|
||||||
|
public function __construct(TranslatorInterface $translator)
|
||||||
|
{
|
||||||
|
$this->translator = $translator;
|
||||||
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder->add('auto-select-collections', 'checkbox', [
|
$builder->add('auto-select-collections', CheckboxType::class, [
|
||||||
'label' => 'Auto select databases',
|
'label' => 'Auto select databases',
|
||||||
'help_message' => 'This option disables the selecting of the databases on which a user can register himself, and registration is made on all granted databases.',
|
'help_message' => /** @Ignore */ $this->translator->trans('This option disables the selecting of the databases on which a user can register himself, and registration is made on all granted databases.'),
|
||||||
]);
|
]);
|
||||||
$builder->add('auto-register-enabled', 'checkbox', [
|
$builder->add('auto-register-enabled', CheckboxType::class, [
|
||||||
'label' => 'Enable auto registration',
|
'label' => 'Enable auto registration',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@@ -11,23 +11,36 @@
|
|||||||
|
|
||||||
namespace Alchemy\Phrasea\Form\Configuration;
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use JMS\TranslationBundle\Annotation\Ignore;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Translation\TranslatorInterface;
|
||||||
|
|
||||||
class SearchEngineFormType extends AbstractType
|
class SearchEngineFormType extends AbstractType
|
||||||
{
|
{
|
||||||
|
/** @var TranslatorInterface */
|
||||||
|
private $translator;
|
||||||
|
|
||||||
|
public function __construct(TranslatorInterface $translator)
|
||||||
|
{
|
||||||
|
$this->translator = $translator;
|
||||||
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder->add('min-letters-truncation', 'integer', [
|
$builder->add('min-letters-truncation', IntegerType::class, [
|
||||||
'label' => 'Minimum number of letters before truncation',
|
'label' => 'Minimum number of letters before truncation',
|
||||||
'help_message' => 'Used in search engine',
|
'help_message' => /** @Ignore */ $this->translator->trans('Used in search engine'),
|
||||||
]);
|
]);
|
||||||
$builder->add('default-query', 'text', [
|
$builder->add('default-query', TextType::class, [
|
||||||
'label' => 'Default query',
|
'label' => 'Default query',
|
||||||
]);
|
]);
|
||||||
$builder->add('default-query-type', 'choice', [
|
$builder->add('default-query-type', ChoiceType::class, [
|
||||||
'label' => 'Default searched type',
|
'label' => 'Default searched type',
|
||||||
'help_message' => 'Used when opening the application',
|
'help_message' => /** @Ignore */ $this->translator->trans('Used when opening the application'),
|
||||||
'choices' => ['0' => 'Documents', '1' => 'Stories'],
|
'choices' => ['0' => 'Documents', '1' => 'Stories'],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@@ -11,12 +11,16 @@
|
|||||||
|
|
||||||
namespace Alchemy\Phrasea\Form\Configuration;
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use JMS\TranslationBundle\Annotation\Ignore;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\Translation\TranslatorInterface;
|
use Symfony\Component\Translation\TranslatorInterface;
|
||||||
|
|
||||||
class WebservicesFormType extends AbstractType
|
class WebservicesFormType extends AbstractType
|
||||||
{
|
{
|
||||||
|
/** @var TranslatorInterface */
|
||||||
private $translator;
|
private $translator;
|
||||||
|
|
||||||
public function __construct(TranslatorInterface $translator)
|
public function __construct(TranslatorInterface $translator)
|
||||||
@@ -28,22 +32,22 @@ class WebservicesFormType extends AbstractType
|
|||||||
{
|
{
|
||||||
$recaptchaDoc = '<a href="http://www.google.com/recaptcha">http://www.google.com/recaptcha</a>';
|
$recaptchaDoc = '<a href="http://www.google.com/recaptcha">http://www.google.com/recaptcha</a>';
|
||||||
|
|
||||||
$builder->add('google-charts-enabled', 'checkbox', [
|
$builder->add('google-charts-enabled', CheckboxType::class, [
|
||||||
'label' => 'Use Google Chart API',
|
'label' => 'Use Google Chart API',
|
||||||
]);
|
]);
|
||||||
$builder->add('geonames-server', 'text', [
|
$builder->add('geonames-server', TextType::class, [
|
||||||
'label' => 'Geonames server address',
|
'label' => 'Geonames server address',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder->add('captchas-enabled', 'checkbox', [
|
$builder->add('captchas-enabled', CheckboxType::class, [
|
||||||
'label' => 'Use recaptcha API',
|
'label' => $this->translator->trans('Use recaptcha API'),
|
||||||
'help_message' => /** @Ignore */ $this->translator->trans('See documentation at %url%', ['%url%' => $recaptchaDoc]),
|
'help_message' => /** @Ignore */$this->translator->trans('See documentation at %url%', ['%url%' => $recaptchaDoc]),
|
||||||
'translation_domain' => false
|
'translation_domain' => false
|
||||||
]);
|
]);
|
||||||
$builder->add('recaptcha-public-key', 'text', [
|
$builder->add('recaptcha-public-key', TextType::class, [
|
||||||
'label' => 'Recaptcha public key',
|
'label' => 'Recaptcha public key',
|
||||||
]);
|
]);
|
||||||
$builder->add('recaptcha-private-key', 'text', [
|
$builder->add('recaptcha-private-key', TextType::class, [
|
||||||
'label' => 'Recaptcha private key',
|
'label' => 'Recaptcha private key',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@@ -11,11 +11,15 @@
|
|||||||
|
|
||||||
namespace Alchemy\Phrasea\Form\Login;
|
namespace Alchemy\Phrasea\Form\Login;
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
|
||||||
use Symfony\Component\Validator\Constraints as Assert;
|
|
||||||
use Silex\Application;
|
use Silex\Application;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
class PhraseaAuthenticationForm extends AbstractType
|
class PhraseaAuthenticationForm extends AbstractType
|
||||||
{
|
{
|
||||||
@@ -28,7 +32,7 @@ class PhraseaAuthenticationForm extends AbstractType
|
|||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder->add('login', 'text', [
|
$builder->add('login', TextType::class, [
|
||||||
'label' => 'Login',
|
'label' => 'Login',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'disabled' => $options['disabled'],
|
'disabled' => $options['disabled'],
|
||||||
@@ -37,7 +41,7 @@ class PhraseaAuthenticationForm extends AbstractType
|
|||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder->add('password', 'password', [
|
$builder->add('password', PasswordType::class, [
|
||||||
'label' => 'Password',
|
'label' => 'Password',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'disabled' => $options['disabled'],
|
'disabled' => $options['disabled'],
|
||||||
@@ -47,7 +51,7 @@ class PhraseaAuthenticationForm extends AbstractType
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
if ($this->app['phraseanet.configuration']['session']['idle'] < 1) {
|
if ($this->app['phraseanet.configuration']['session']['idle'] < 1) {
|
||||||
$builder->add('remember-me', 'checkbox' , [
|
$builder->add('remember-me', CheckboxType::class, [
|
||||||
'label' => 'Remember me',
|
'label' => 'Remember me',
|
||||||
'mapped' => false,
|
'mapped' => false,
|
||||||
'required' => false,
|
'required' => false,
|
||||||
@@ -56,14 +60,14 @@ class PhraseaAuthenticationForm extends AbstractType
|
|||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
$builder->add('remember-me', 'hidden' , [
|
$builder->add('remember-me', HiddenType::class, [
|
||||||
'label' => '',
|
'label' => '',
|
||||||
'mapped' => false,
|
'mapped' => false,
|
||||||
'required' => false
|
'required' => false
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$builder->add('redirect', 'hidden', [
|
$builder->add('redirect', HiddenType::class, [
|
||||||
'required' => false,
|
'required' => false,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@@ -12,6 +12,7 @@
|
|||||||
namespace Alchemy\Phrasea\Form\Login;
|
namespace Alchemy\Phrasea\Form\Login;
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\Validator\Constraints as Assert;
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
@@ -19,7 +20,7 @@ class PhraseaForgotPasswordForm extends AbstractType
|
|||||||
{
|
{
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder->add('email', 'email', [
|
$builder->add('email', EmailType::class, [
|
||||||
'label' => 'E-mail',
|
'label' => 'E-mail',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
|
@@ -14,6 +14,8 @@ namespace Alchemy\Phrasea\Form\Login;
|
|||||||
use Alchemy\Phrasea\Form\Constraint\PasswordToken;
|
use Alchemy\Phrasea\Form\Constraint\PasswordToken;
|
||||||
use Doctrine\ORM\EntityRepository;
|
use Doctrine\ORM\EntityRepository;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\Validator\Constraints as Assert;
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
@@ -31,14 +33,14 @@ class PhraseaRecoverPasswordForm extends AbstractType
|
|||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder->add('token', 'hidden', [
|
$builder->add('token', HiddenType::class, [
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
new PasswordToken($this->repository)
|
new PasswordToken($this->repository)
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder->add('password', 'repeated', [
|
$builder->add('password', RepeatedType::class, [
|
||||||
'type' => 'password',
|
'type' => 'password',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'invalid_message' => 'Please provide the same passwords.',
|
'invalid_message' => 'Please provide the same passwords.',
|
||||||
|
@@ -12,17 +12,26 @@
|
|||||||
namespace Alchemy\Phrasea\Form\Login;
|
namespace Alchemy\Phrasea\Form\Login;
|
||||||
|
|
||||||
use Alchemy\Phrasea\Application;
|
use Alchemy\Phrasea\Application;
|
||||||
|
use Alchemy\Phrasea\Exception\InvalidArgumentException;
|
||||||
use Alchemy\Phrasea\Form\Constraint\NewEmail;
|
use Alchemy\Phrasea\Form\Constraint\NewEmail;
|
||||||
use Alchemy\Phrasea\Utilities\StringHelper;
|
use Alchemy\Phrasea\Utilities\StringHelper;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\Validator\Constraints as Assert;
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
use Alchemy\Phrasea\Exception\InvalidArgumentException;
|
|
||||||
|
|
||||||
class PhraseaRegisterForm extends AbstractType
|
class PhraseaRegisterForm extends AbstractType
|
||||||
{
|
{
|
||||||
private $available;
|
private $available;
|
||||||
private $params;
|
private $params;
|
||||||
|
/**
|
||||||
|
* @var Application
|
||||||
|
*/
|
||||||
|
private $app;
|
||||||
|
|
||||||
public function __construct(Application $app, array $available, array $params = [])
|
public function __construct(Application $app, array $available, array $params = [])
|
||||||
{
|
{
|
||||||
@@ -33,7 +42,7 @@ class PhraseaRegisterForm extends AbstractType
|
|||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder->add('email', 'email', [
|
$builder->add('email', EmailType::class, [
|
||||||
'label' => 'E-mail',
|
'label' => 'E-mail',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
@@ -43,7 +52,7 @@ class PhraseaRegisterForm extends AbstractType
|
|||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder->add('password', 'repeated', [
|
$builder->add('password', RepeatedType::class, [
|
||||||
'type' => 'password',
|
'type' => 'password',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'invalid_message' => 'Please provide the same passwords.',
|
'invalid_message' => 'Please provide the same passwords.',
|
||||||
@@ -58,7 +67,7 @@ class PhraseaRegisterForm extends AbstractType
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
if ($this->app->hasTermsOfUse()) {
|
if ($this->app->hasTermsOfUse()) {
|
||||||
$builder->add('accept-tou', 'checkbox', [
|
$builder->add('accept-tou', CheckboxType::class, [
|
||||||
'label' => 'Terms of Use',
|
'label' => 'Terms of Use',
|
||||||
'mapped' => false,
|
'mapped' => false,
|
||||||
"constraints" => [
|
"constraints" => [
|
||||||
@@ -68,7 +77,7 @@ class PhraseaRegisterForm extends AbstractType
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$builder->add('provider-id', 'hidden');
|
$builder->add('provider-id', HiddenType::class);
|
||||||
|
|
||||||
$choices = $baseIds = [];
|
$choices = $baseIds = [];
|
||||||
|
|
||||||
@@ -84,7 +93,7 @@ class PhraseaRegisterForm extends AbstractType
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->app['conf']->get(['registry', 'registration', 'auto-select-collections'])) {
|
if (!$this->app['conf']->get(['registry', 'registration', 'auto-select-collections'])) {
|
||||||
$builder->add('collections', 'choice', [
|
$builder->add('collections', ChoiceType::class, [
|
||||||
'choices' => $choices,
|
'choices' => $choices,
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
|
@@ -12,6 +12,8 @@
|
|||||||
namespace Alchemy\Phrasea\Form\Login;
|
namespace Alchemy\Phrasea\Form\Login;
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\Validator\Constraints as Assert;
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
@@ -22,7 +24,7 @@ class PhraseaRenewPasswordForm extends AbstractType
|
|||||||
{
|
{
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder->add('oldPassword', 'password', [
|
$builder->add('oldPassword', PasswordType::class, [
|
||||||
'label' => 'Current password',
|
'label' => 'Current password',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
@@ -30,7 +32,7 @@ class PhraseaRenewPasswordForm extends AbstractType
|
|||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder->add('password', 'repeated', [
|
$builder->add('password', RepeatedType::class, [
|
||||||
'type' => 'password',
|
'type' => 'password',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'invalid_message' => 'Please provide the same passwords.',
|
'invalid_message' => 'Please provide the same passwords.',
|
||||||
|
@@ -13,22 +13,26 @@ namespace Alchemy\Phrasea\Form;
|
|||||||
|
|
||||||
use Alchemy\Phrasea\Model\Entities\Task;
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\Validator\Constraints as Assert;
|
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
class TaskForm extends AbstractType
|
class TaskForm extends AbstractType
|
||||||
{
|
{
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder->add('name', 'text', [
|
$builder->add('name', TextType::class, [
|
||||||
'label' => 'Task name',
|
'label' => 'Task name',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
new Assert\NotBlank(),
|
new Assert\NotBlank(),
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
$builder->add('period', 'integer', [
|
$builder->add('period', IntegerType::class, [
|
||||||
'label' => 'Task period (in seconds)',
|
'label' => 'Task period (in seconds)',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
@@ -36,14 +40,14 @@ class TaskForm extends AbstractType
|
|||||||
new Assert\GreaterThan(['value' => 0]),
|
new Assert\GreaterThan(['value' => 0]),
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
$builder->add('status', 'choice', [
|
$builder->add('status', ChoiceType::class, [
|
||||||
'label' => 'The task status',
|
'label' => 'The task status',
|
||||||
'choices' => [
|
'choices' => [
|
||||||
Task::STATUS_STARTED => 'Started',
|
Task::STATUS_STARTED => 'Started',
|
||||||
Task::STATUS_STOPPED => 'Stopped',
|
Task::STATUS_STOPPED => 'Stopped',
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
$builder->add('settings', 'hidden');
|
$builder->add('settings', HiddenType::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
namespace Alchemy\Phrasea\SearchEngine\Elastic;
|
namespace Alchemy\Phrasea\SearchEngine\Elastic;
|
||||||
|
|
||||||
use Alchemy\Phrasea\SearchEngine\Elastic\Structure\GlobalStructure;
|
use Alchemy\Phrasea\SearchEngine\Elastic\Structure\GlobalStructure;
|
||||||
|
use JMS\TranslationBundle\Annotation\Ignore;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
@@ -31,6 +32,7 @@ class ElasticsearchSettingsFormType extends AbstractType
|
|||||||
{
|
{
|
||||||
$this->globalStructure = $g;
|
$this->globalStructure = $g;
|
||||||
$this->esSettings = $settings;
|
$this->esSettings = $settings;
|
||||||
|
$this->translator = $translator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
@@ -110,14 +112,14 @@ class ElasticsearchSettingsFormType extends AbstractType
|
|||||||
}
|
}
|
||||||
$choices = array_merge(["not aggregated" => 0], $choices); // add this option always as first choice
|
$choices = array_merge(["not aggregated" => 0], $choices); // add this option always as first choice
|
||||||
$aggs[$k] = [ // default value will be replaced by hardcoded tech fields & all databoxes fields
|
$aggs[$k] = [ // default value will be replaced by hardcoded tech fields & all databoxes fields
|
||||||
'label' => /** @Ignore */ $label,
|
'label' => $label,
|
||||||
'choices_as_values' => true,
|
'choices_as_values' => true,
|
||||||
'choices' => $choices,
|
'choices' => $choices,
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'class' => 'aggregate'
|
'class' => 'aggregate'
|
||||||
],
|
],
|
||||||
'disabled' => $disabled,
|
'disabled' => $disabled,
|
||||||
'help_message' => /** @Ignore */ $this->translator->trans($help), // todo : not displayed ?
|
'help_message' => /** @Ignore */ $help, // todo : not displayed ?
|
||||||
'translation_domain' => false
|
'translation_domain' => false
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -125,7 +127,7 @@ class ElasticsearchSettingsFormType extends AbstractType
|
|||||||
// all fields fron conf
|
// all fields fron conf
|
||||||
foreach($this->esSettings->getAggregableFields() as $k=>$f) {
|
foreach($this->esSettings->getAggregableFields() as $k=>$f) {
|
||||||
// default value will be replaced by hardcoded tech fields & all databoxes fields
|
// default value will be replaced by hardcoded tech fields & all databoxes fields
|
||||||
$addAgg($k, "/?\\ " . $k, "This field does not exists in current databoxes.", true);
|
$addAgg($k, "/?\\ " . $k, $this->translator->trans("This field does not exists in current databoxes."), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// add or replace hardcoded tech fields
|
// add or replace hardcoded tech fields
|
||||||
@@ -135,7 +137,7 @@ class ElasticsearchSettingsFormType extends AbstractType
|
|||||||
$label = '#' . $k;
|
$label = '#' . $k;
|
||||||
if(!array_key_exists($k, $aggs)) {
|
if(!array_key_exists($k, $aggs)) {
|
||||||
$label = "/!\\ " . $label;
|
$label = "/!\\ " . $label;
|
||||||
$help = "New field, please confirm setting.";
|
$help = $this->translator->trans("New field, please confirm setting.");
|
||||||
}
|
}
|
||||||
$addAgg($k, $label, $help, false, $choices);
|
$addAgg($k, $label, $help, false, $choices);
|
||||||
}
|
}
|
||||||
@@ -146,7 +148,7 @@ class ElasticsearchSettingsFormType extends AbstractType
|
|||||||
$help = null;
|
$help = null;
|
||||||
if(!array_key_exists($field->getName(), $aggs)) {
|
if(!array_key_exists($field->getName(), $aggs)) {
|
||||||
$label = "/!\\ " . $label;
|
$label = "/!\\ " . $label;
|
||||||
$help = "New field, please confirm setting.";
|
$help = $this->translator->trans("New field, please confirm setting.");
|
||||||
}
|
}
|
||||||
$addAgg($k, $label, $help); // default choices
|
$addAgg($k, $label, $help); // default choices
|
||||||
}
|
}
|
||||||
|
@@ -56,7 +56,7 @@ class FacetsResponse
|
|||||||
if($response['aggregations'][$name . '#empty']['doc_count'] > 0) { // don't add a facet for 0 results
|
if($response['aggregations'][$name . '#empty']['doc_count'] > 0) { // don't add a facet for 0 results
|
||||||
$aggregation['buckets'][] = [
|
$aggregation['buckets'][] = [
|
||||||
'key' => '_empty_',
|
'key' => '_empty_',
|
||||||
'value' => sprintf($this->translator->trans('prod:workzone:facetstab:unset_field_facet_label_(%s)'), $name), // special homemade prop to display a human value instead of the key
|
'value' => $this->translator->trans('prod:workzone:facetstab:unset_field_facet_label_(%fieldname%)', ['%fieldname%' =>$name]), // special homemade prop to display a human value instead of the key
|
||||||
'doc_count' => $response['aggregations'][$name . '#empty']['doc_count']
|
'doc_count' => $response['aggregations'][$name . '#empty']['doc_count']
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@@ -13,6 +13,6 @@ class APIClientsFormTypeTest extends FormTestCase
|
|||||||
{
|
{
|
||||||
public function getForm()
|
public function getForm()
|
||||||
{
|
{
|
||||||
return new APIClientsFormType();
|
return new APIClientsFormType(self::$DI['app']['translator']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -13,6 +13,6 @@ class ActionsFormTypeTest extends FormTestCase
|
|||||||
{
|
{
|
||||||
public function getForm()
|
public function getForm()
|
||||||
{
|
{
|
||||||
return new ActionsFormType();
|
return new ActionsFormType(self::$DI['app']['translator']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -13,6 +13,6 @@ class FtpExportFormTypeTest extends FormTestCase
|
|||||||
{
|
{
|
||||||
public function getForm()
|
public function getForm()
|
||||||
{
|
{
|
||||||
return new FtpExportFormType();
|
return new FtpExportFormType(self::$DI['app']['translator']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -13,6 +13,6 @@ class ModulesFormTypeTest extends FormTestCase
|
|||||||
{
|
{
|
||||||
public function getForm()
|
public function getForm()
|
||||||
{
|
{
|
||||||
return new ModulesFormType();
|
return new ModulesFormType(self::$DI['app']['translator']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -13,6 +13,6 @@ class RegistrationFormTypeTest extends FormTestCase
|
|||||||
{
|
{
|
||||||
public function getForm()
|
public function getForm()
|
||||||
{
|
{
|
||||||
return new RegistrationFormType();
|
return new RegistrationFormType(self::$DI['app']['translator']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -13,6 +13,6 @@ class SearchEngineFormTypeTest extends FormTestCase
|
|||||||
{
|
{
|
||||||
public function getForm()
|
public function getForm()
|
||||||
{
|
{
|
||||||
return new SearchEngineFormType();
|
return new SearchEngineFormType(self::$DI['app']['translator']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user