mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Add configuration form types
This commit is contained in:
91
lib/Alchemy/Phrasea/Form/Configuration/ClientFormType.php
Normal file
91
lib/Alchemy/Phrasea/Form/Configuration/ClientFormType.php
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class ClientFormType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder->add('GV_download_max', 'integer', array(
|
||||||
|
'label' => _('Maximum megabytes allowed for download'),
|
||||||
|
'data' => 120,
|
||||||
|
'help_message' => _('If request is bigger, then mail is still available'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_ong_search', 'integer', array(
|
||||||
|
'label' => _('Search tab position'),
|
||||||
|
'data' => 1,
|
||||||
|
));
|
||||||
|
$builder->add('GV_ong_advsearch', 'integer', array(
|
||||||
|
'label' => _('Advanced search tab position'),
|
||||||
|
'data' => 2,
|
||||||
|
));
|
||||||
|
$builder->add('GV_ong_topics', 'integer', array(
|
||||||
|
'label' => _('Topics tab position'),
|
||||||
|
'data' => 0,
|
||||||
|
));
|
||||||
|
$builder->add('GV_ong_actif', 'integer', array(
|
||||||
|
'label' => _('Active tab position'),
|
||||||
|
'data' => 1,
|
||||||
|
));
|
||||||
|
|
||||||
|
$builder->add('GV_client_render_topics', 'choice', array(
|
||||||
|
'label' => _('Topics display mode'),
|
||||||
|
'data' => 'tree',
|
||||||
|
'choices' => array('tree' => _('Trees'), 'popups' => _('Drop-down')),
|
||||||
|
));
|
||||||
|
|
||||||
|
$builder->add('GV_rollover_reg_preview', 'checkbox', array(
|
||||||
|
'label' => _('Enable roll-over on stories'),
|
||||||
|
'data' => true,
|
||||||
|
));
|
||||||
|
$builder->add('GV_rollover_chu', 'checkbox', array(
|
||||||
|
'label' => _('Enable roll-over on basket elements'),
|
||||||
|
'data' => true,
|
||||||
|
));
|
||||||
|
|
||||||
|
$builder->add('GV_client_coll_ckbox', 'choice', array(
|
||||||
|
'label' => _('Collections display mode'),
|
||||||
|
'data' => 'checkbox',
|
||||||
|
'choices' => array('popup' => _('Drop-down'), 'checkbox' => _('Check-box')),
|
||||||
|
));
|
||||||
|
|
||||||
|
$builder->add('GV_viewSizeBaket', 'checkbox', array(
|
||||||
|
'label' => _('Display the total size of the document basket'),
|
||||||
|
'data' => true,
|
||||||
|
));
|
||||||
|
$builder->add('GV_clientAutoShowProposals', 'checkbox', array(
|
||||||
|
'label' => _('Display proposals tab'),
|
||||||
|
'data' => true,
|
||||||
|
));
|
||||||
|
$builder->add('GV_needAuth2DL', 'checkbox', array(
|
||||||
|
'label' => _('Require authentication to download documents'),
|
||||||
|
'data' => true,
|
||||||
|
'help_message' => _('Used for guest account'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_requireTOUValidationForExport', 'checkbox', array(
|
||||||
|
'label' => _('Users must accept Terms of Use for each export'),
|
||||||
|
'data' => false,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class DailymotionFormType extends AbstractType
|
||||||
|
{
|
||||||
|
/** @var UrlGenerator */
|
||||||
|
private $generator;
|
||||||
|
|
||||||
|
public function __construct(UrlGenerator $generator)
|
||||||
|
{
|
||||||
|
$this->generator = $generator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$create_api_dailymotion = '<a href="http://www.dailymotion.com/profile/developer" target="_blank">http://www.dailymotion.com/profile/developer</a>';
|
||||||
|
|
||||||
|
try {
|
||||||
|
$dailymotion_callback = $this->generator->generate('prod_bridge_callback', array('api_name' => 'dailymotion'), UrlGenerator::ABSOLUTE_URL);
|
||||||
|
} catch (RouteNotFoundException $e) {
|
||||||
|
$dailymotion_callback = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$builder->add('GV_dailymotion_api', 'checkbox', array(
|
||||||
|
'label' => _('Use Dailymotion API'),
|
||||||
|
'data' => false,
|
||||||
|
'help_message' => sprintf(_('Create API account at %s, then use %s as callback URL value'), $create_api_dailymotion, $dailymotion_callback),
|
||||||
|
));
|
||||||
|
|
||||||
|
$builder->add('GV_dailymotion_client_id', 'text', array(
|
||||||
|
'label' => _('Dailymotion public key'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_dailymotion_client_secret', 'text', array(
|
||||||
|
'label' => _('Dailymotion secret key'),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
52
lib/Alchemy/Phrasea/Form/Configuration/DisplayFormType.php
Normal file
52
lib/Alchemy/Phrasea/Form/Configuration/DisplayFormType.php
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class DisplayFormType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder->add('GV_adminMail', 'text', array(
|
||||||
|
'label' => _('Admin email'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_view_bas_and_coll', 'checkbox', array(
|
||||||
|
'label' => _('Display the name of databases and collections'),
|
||||||
|
'data' => true,
|
||||||
|
));
|
||||||
|
$builder->add('GV_choose_export_title', 'checkbox', array(
|
||||||
|
'label' => _('Choose the title of the document to export'),
|
||||||
|
'data' => false,
|
||||||
|
));
|
||||||
|
$builder->add('GV_default_export_title', 'choice', array(
|
||||||
|
'label' => _('Default export title'),
|
||||||
|
'data' => 'title',
|
||||||
|
'choices' => array('title' => _('Document title'), 'original' => _('Original name')),
|
||||||
|
));
|
||||||
|
$builder->add('GV_social_tools', 'choice', array(
|
||||||
|
'label' => _('Enable this setting to share on Facebook and Twitter'),
|
||||||
|
'data' => 'none',
|
||||||
|
'choices' => array('none' => _('Disabled'), 'publishers' => _('Publishers'), 'all' => _('Enabled')),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
61
lib/Alchemy/Phrasea/Form/Configuration/EmailFormType.php
Normal file
61
lib/Alchemy/Phrasea/Form/Configuration/EmailFormType.php
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class EmailFormType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder->add('GV_defaulmailsenderaddr', 'text', array(
|
||||||
|
'label' => _('Default mail sender address'),
|
||||||
|
'data' => 'phraseanet@example.com',
|
||||||
|
));
|
||||||
|
$builder->add('GV_email_prefix', 'text', array(
|
||||||
|
'label' => _('Prefix for notification emails'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_smtp', 'checkbox', array(
|
||||||
|
'label' => _('Use a SMTP server'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_smtp_auth', 'checkbox', array(
|
||||||
|
'label' => _('Enable SMTP authentication'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_smtp_host', 'text', array(
|
||||||
|
'label' => _('SMTP host'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_smtp_port', 'text', array(
|
||||||
|
'label' => _('SMTP port'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_smtp_secure', 'choice', array(
|
||||||
|
'label' => _('SMTP encryption'),
|
||||||
|
'data' => 'tls',
|
||||||
|
'choices' => array('none' => _('None'), 'ssl' => 'SSL', 'tls' => 'TLS'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_smtp_user', 'text', array(
|
||||||
|
'label' => _('SMTP user'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_smtp_password', 'text', array(
|
||||||
|
'label' => _('SMTP password'),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,67 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class ExecutablesFormType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder->add('GV_h264_streaming', 'checkbox', array(
|
||||||
|
'label' => _('Enable H264 stream mode'),
|
||||||
|
'data' => false,
|
||||||
|
'help_message' => _('Use with mod_token. Attention requires the apache modules and mod_h264_streaming mod_auth_token'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_mod_auth_token_directory', 'text', array(
|
||||||
|
'label' => _('Auth_token mount point'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_mod_auth_token_directory_path', 'text', array(
|
||||||
|
'label' => _('Auth_token directory path'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_mod_auth_token_passphrase', 'text', array(
|
||||||
|
'label' => _('Auth_token passphrase'),
|
||||||
|
'help_message' => _('Defined in Apache configuration'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_PHP_INI', 'text', array(
|
||||||
|
'label' => _('php.ini path'),
|
||||||
|
'help_message' => _('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>';
|
||||||
|
$builder->add('GV_imagine_driver', 'choice', array(
|
||||||
|
'label' => _('Imagine driver'),
|
||||||
|
'data' => '',
|
||||||
|
'help_message' => _(sprintf('See documentation at %s', $imagineDoc)),
|
||||||
|
'choices' => array('' => 'Auto', 'gmagick' => 'GraphicsMagick', 'imagick' => 'ImageMagick', 'gd' => 'GD')
|
||||||
|
));
|
||||||
|
|
||||||
|
$builder->add('GV_ffmpeg_threads', 'integer', array(
|
||||||
|
'label' => _('Number of threads to use for FFMpeg'),
|
||||||
|
'data' => 2,
|
||||||
|
));
|
||||||
|
$builder->add('GV_pdfmaxpages', 'integer', array(
|
||||||
|
'label' => _('Maximum number of pages to be extracted from PDF'),
|
||||||
|
'data' => 5,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
61
lib/Alchemy/Phrasea/Form/Configuration/FlickrFormType.php
Normal file
61
lib/Alchemy/Phrasea/Form/Configuration/FlickrFormType.php
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class FlickrFormType extends AbstractType
|
||||||
|
{
|
||||||
|
/** @var UrlGenerator */
|
||||||
|
private $generator;
|
||||||
|
|
||||||
|
public function __construct(UrlGenerator $generator)
|
||||||
|
{
|
||||||
|
$this->generator = $generator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$create_api_flickr = '<a href="https://secure.flickr.com/services/apps/create/" target="_blank">https://secure.flickr.com/services/apps/create/</a>';
|
||||||
|
|
||||||
|
try {
|
||||||
|
$flickr_callback = $this->generator->generate('prod_bridge_callback', array('api_name' => 'flickr'), UrlGenerator::ABSOLUTE_URL);
|
||||||
|
} catch (RouteNotFoundException $e) {
|
||||||
|
$flickr_callback = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$builder->add('GV_flickr_api', 'checkbox', array(
|
||||||
|
'label' => _('Use Flickr API'),
|
||||||
|
'data' => false,
|
||||||
|
'help_message' => sprintf(_('Create API account at %s, then use %s as callback URL value'), $create_api_flickr, $flickr_callback),
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
|
$builder->add('GV_flickr_client_id', 'text', array(
|
||||||
|
'label' => _('Flickr public key'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_flickr_client_secret', 'text', array(
|
||||||
|
'label' => _('Flickr secret key'),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
41
lib/Alchemy/Phrasea/Form/Configuration/FtpExportFormType.php
Normal file
41
lib/Alchemy/Phrasea/Form/Configuration/FtpExportFormType.php
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class FtpExportFormType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder->add('GV_activeFTP', 'checkbox', array(
|
||||||
|
'label' => _('Enable FTP export'),
|
||||||
|
'data' => false,
|
||||||
|
'help_message' => _('Available in multi-export tab'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_ftp_for_user', 'checkbox', array(
|
||||||
|
'label' => _('Enable FTP for users'),
|
||||||
|
'data' => false,
|
||||||
|
'help_message' => _('By default it is available for admins'),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
36
lib/Alchemy/Phrasea/Form/Configuration/HomepageFormType.php
Normal file
36
lib/Alchemy/Phrasea/Form/Configuration/HomepageFormType.php
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class HomepageFormType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder->add('GV_home_publi', 'choice', array(
|
||||||
|
'label' => _('Homepage slideshow'),
|
||||||
|
'data' => 'GALLERIA',
|
||||||
|
'choices' => array('DISPLAYx1' => _('Single image'), 'SCROLL' => _('Slide show'), 'COOLIRIS' => 'Cooliris', 'CAROUSEL' => _('Carousel'), 'GALLERIA' => _('Gallery')),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class HttpServerFormType extends AbstractType
|
||||||
|
{
|
||||||
|
private $availableLanguages;
|
||||||
|
|
||||||
|
public function __construct(array $availableLanguages)
|
||||||
|
{
|
||||||
|
$this->availableLanguages = $availableLanguages;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder->add('GV_default_lng', 'choice', array(
|
||||||
|
'multiple' => false,
|
||||||
|
'expanded' => false,
|
||||||
|
'choices' => $this->availableLanguages,
|
||||||
|
'label' => _('Default language'),
|
||||||
|
'data' => 'fr_FR',
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,119 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class MainConfigurationFormType extends AbstractType
|
||||||
|
{
|
||||||
|
private $languages;
|
||||||
|
private $generator;
|
||||||
|
|
||||||
|
public function __construct(array $languages, UrlGenerator $generator)
|
||||||
|
{
|
||||||
|
$this->languages = $languages;
|
||||||
|
$this->generator = $generator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder->add('http', new HttpServerFormType($this->languages), array(
|
||||||
|
'label' => _('HTTP Server'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
$builder->add('maintenance', new MaintenanceFormType(), array(
|
||||||
|
'label' => _('Maintenance state'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
$builder->add('webservices', new WebservicesFormType(), array(
|
||||||
|
'label' => _('Webservices connectivity'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
$builder->add('youtube-api', new YoutubeFormType($this->generator), array(
|
||||||
|
'label' => _('Youtube connectivity'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
$builder->add('flickr-api', new FlickrFormType($this->generator), array(
|
||||||
|
'label' => _('FlickR connectivity'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
$builder->add('dailymotion-api', new DailymotionFormType($this->generator), array(
|
||||||
|
'label' => _('Dailymotion connectivity'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
$builder->add('phraseanet-client', new PhraseanetClientAPIFormType(), array(
|
||||||
|
'label' => _('Phraseanet client API'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
$builder->add('storage', new StorageFormType(), array(
|
||||||
|
'label' => _('Documents storage'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
$builder->add('executables', new ExecutablesFormType(), array(
|
||||||
|
'label' => _('Executables settings'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
$builder->add('homepage', new HomepageFormType(), array(
|
||||||
|
'label' => _('Main configuration'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
$builder->add('display', new DisplayFormType(), array(
|
||||||
|
'label' => _('Homepage'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
$builder->add('searchengine', new SearchEngineFormType(), array(
|
||||||
|
'label' => _('Search engine'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
$builder->add('report', new ReportFormType(), array(
|
||||||
|
'label' => _('Report'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
$builder->add('modules', new ModulesFormType(), array(
|
||||||
|
'label' => _('Additionnal modules'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
$builder->add('email', new EmailFormType(), array(
|
||||||
|
'label' => _('Emails'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
$builder->add('client', new FtpExportFormType(), array(
|
||||||
|
'label' => _('FTP Export'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
$builder->add('client', new ClientFormType(), array(
|
||||||
|
'label' => _('Client'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
$builder->add('registration', new RegistrationFormType(), array(
|
||||||
|
'label' => _('Registration'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
$builder->add('push', new PushFormType(), array(
|
||||||
|
'label' => _('Push configuration'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
$builder->add('robots', new RobotsFormType(), array(
|
||||||
|
'label' => _('Robot indexing'),
|
||||||
|
'required' => false,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class MaintenanceFormType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder->add('GV_message', 'text', array(
|
||||||
|
'label' => _('Maintenance message'),
|
||||||
|
'data' => 'The application is down for maintenance',
|
||||||
|
));
|
||||||
|
$builder->add('GV_message_on', 'checkbox', array(
|
||||||
|
'label' => _('Enable maintenance message broadcast'),
|
||||||
|
'data' => false,
|
||||||
|
));
|
||||||
|
$builder->add('GV_log_errors', 'checkbox', array(
|
||||||
|
'label' => _('Log errors'),
|
||||||
|
'data' => false,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
47
lib/Alchemy/Phrasea/Form/Configuration/ModulesFormType.php
Normal file
47
lib/Alchemy/Phrasea/Form/Configuration/ModulesFormType.php
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class ModulesFormType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder->add('GV_thesaurus', 'checkbox', array(
|
||||||
|
'label' => _('Enable thesaurus'),
|
||||||
|
'data' => true,
|
||||||
|
));
|
||||||
|
$builder->add('GV_multiAndReport', 'checkbox', array(
|
||||||
|
'label' => _('Enable multi-doc mode'),
|
||||||
|
'data' => true,
|
||||||
|
));
|
||||||
|
$builder->add('GV_seeOngChgDoc', 'checkbox', array(
|
||||||
|
'label' => _('Enable HD substitution'),
|
||||||
|
'data' => true,
|
||||||
|
));
|
||||||
|
$builder->add('GV_seeNewThumb', 'checkbox', array(
|
||||||
|
'label' => _('Enable thumbnail substitution'),
|
||||||
|
'data' => true,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class PhraseanetClientAPIFormType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder->add('GV_client_navigator', 'checkbox', array(
|
||||||
|
'label' => _('Authorize *Phraseanet Navigator*'),
|
||||||
|
'data' => true,
|
||||||
|
'help_message' => _('*Phraseanet Navigator* is a smartphone application that allow user to connect on this instance'),
|
||||||
|
));
|
||||||
|
|
||||||
|
$builder->add('GV_client_officeplugin', 'checkbox', array(
|
||||||
|
'label' => _('Authorize Microsoft Office Plugin to connect.'),
|
||||||
|
'data' => true,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
38
lib/Alchemy/Phrasea/Form/Configuration/PushFormType.php
Normal file
38
lib/Alchemy/Phrasea/Form/Configuration/PushFormType.php
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class PushFormType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder->add('GV_validation_reminder', 'integer', array(
|
||||||
|
'label' => _('Number of days before the end of the validation to send a reminder email'),
|
||||||
|
'data' => 2,
|
||||||
|
));
|
||||||
|
$builder->add('GV_val_expiration', 'integer', array(
|
||||||
|
'label' => _('Default validation links duration'),
|
||||||
|
'data' => 10,
|
||||||
|
'help_message' => _('If set to 0, duration is permanent'),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class RegistrationFormType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder->add('GV_autoselectDB', 'checkbox', array(
|
||||||
|
'label' => _('Auto select databases'),
|
||||||
|
'data' => true,
|
||||||
|
'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.'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_autoregister', 'checkbox', array(
|
||||||
|
'label' => _('Enable auto registration'),
|
||||||
|
'data' => false,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
36
lib/Alchemy/Phrasea/Form/Configuration/ReportFormType.php
Normal file
36
lib/Alchemy/Phrasea/Form/Configuration/ReportFormType.php
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class ReportFormType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder->add('GV_anonymousReport', 'checkbox', array(
|
||||||
|
'label' => _('Anonymous report'),
|
||||||
|
'data' => false,
|
||||||
|
'help_message' => _('Hide information about users'),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
46
lib/Alchemy/Phrasea/Form/Configuration/RobotsFormType.php
Normal file
46
lib/Alchemy/Phrasea/Form/Configuration/RobotsFormType.php
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class RobotsFormType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder->add('GV_homeTitle', 'text', array(
|
||||||
|
'label' => _('Application title'),
|
||||||
|
'data' => 'Phraseanet',
|
||||||
|
));
|
||||||
|
$builder->add('GV_metaKeywords', 'text', array(
|
||||||
|
'label' => _('Keywords used for indexing purposes by search engines robots'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_metaDescription', 'textarea', array(
|
||||||
|
'label' => _('Application description'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_googleAnalytics', 'text', array(
|
||||||
|
'label' => _('Google Analytics identifier'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_allow_search_engine', 'checkbox', array(
|
||||||
|
'label' => _('Allow the website to be indexed by search engines like Google'),
|
||||||
|
'data' => true,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,46 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class SearchEngineFormType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder->add('GV_min_letters_truncation', 'integer', array(
|
||||||
|
'label' => _('Minimum number of letters before truncation'),
|
||||||
|
'data' => 1,
|
||||||
|
'help_message' => _('Used in search engine'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_defaultQuery', 'text', array(
|
||||||
|
'label' => _('Default query'),
|
||||||
|
'data' => 'all',
|
||||||
|
));
|
||||||
|
$builder->add('GV_defaultQuery_type', 'choice', array(
|
||||||
|
'label' => _('Default searched type'),
|
||||||
|
'data' => 0,
|
||||||
|
'help_message' => _('Used when opening the application'),
|
||||||
|
'choices' => array('0' => _('Documents'), '1' => _('Stories')),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
32
lib/Alchemy/Phrasea/Form/Configuration/StorageFormType.php
Normal file
32
lib/Alchemy/Phrasea/Form/Configuration/StorageFormType.php
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class StorageFormType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder->add('GV_base_datapath_noweb', 'text', array(
|
||||||
|
'label' => _('Default path for datas'),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class WebservicesFormType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$recaptchaDoc = '<a href="http://www.google.com/recaptcha">http://www.google.com/recaptcha</a>';
|
||||||
|
|
||||||
|
$builder->add('GV_google_api', 'checkbox', array(
|
||||||
|
'label' => _('Use Google Chart API'),
|
||||||
|
'data' => true,
|
||||||
|
));
|
||||||
|
$builder->add('GV_i18n_service', 'text', array(
|
||||||
|
'label' => _('Geonames server address'),
|
||||||
|
'data' => 'https://geonames.alchemyasp.com/',
|
||||||
|
));
|
||||||
|
$builder->add('GV_captchas', 'checkbox', array(
|
||||||
|
'label' => _('Use recaptcha API'),
|
||||||
|
'data' => false,
|
||||||
|
'help_message' => _(sprintf('See documentation at %s', $recaptchaDoc)),
|
||||||
|
));
|
||||||
|
$builder->add('GV_captcha_public_key', 'text', array(
|
||||||
|
'label' => _('Recaptcha public key'),
|
||||||
|
'data' => '',
|
||||||
|
));
|
||||||
|
$builder->add('GV_captcha_private_key', 'text', array(
|
||||||
|
'label' => _('Recaptcha private key'),
|
||||||
|
'data' => '',
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
65
lib/Alchemy/Phrasea/Form/Configuration/YoutubeFormType.php
Normal file
65
lib/Alchemy/Phrasea/Form/Configuration/YoutubeFormType.php
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
class YoutubeFormType extends AbstractType
|
||||||
|
{
|
||||||
|
/** @var UrlGenerator */
|
||||||
|
private $generator;
|
||||||
|
|
||||||
|
public function __construct(UrlGenerator $generator)
|
||||||
|
{
|
||||||
|
$this->generator = $generator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$dashboard_youtube = '<a href="https://code.google.com/apis/youtube/dashboard/" target="_blank">https://code.google.com/apis/youtube/dashboard/</a>';
|
||||||
|
$youtube_console_url = '<a href="https://code.google.com/apis/console/" target="_blank">https://code.google.com/apis/console/</a>';
|
||||||
|
|
||||||
|
try {
|
||||||
|
$youtube_callback = $this->generator->generate('prod_bridge_callback', array('api_name' => 'youtube'), UrlGenerator::ABSOLUTE_URL);
|
||||||
|
} catch (RouteNotFoundException $e) {
|
||||||
|
$youtube_callback = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$builder->add('GV_youtube_api', 'checkbox', array(
|
||||||
|
'label' => _('Use youtube API'),
|
||||||
|
'data' => false,
|
||||||
|
'help_message' => sprintf(_('Create API account at %s, then use %s as callback URL value'), $youtube_console_url, $youtube_callback),
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
|
$builder->add('GV_youtube_client_id', 'text', array(
|
||||||
|
'label' => _('Youtube public key'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_youtube_client_secret', 'text', array(
|
||||||
|
'label' => _('Youtube secret key'),
|
||||||
|
));
|
||||||
|
$builder->add('GV_youtube_dev_key', 'text', array(
|
||||||
|
'label' => _('Youtube developer key'),
|
||||||
|
'help_message' => sprintf(_('See %s'), $dashboard_youtube),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\ClientFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class ClientFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new ClientFormType();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\DailymotionFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class DailymotionFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new DailymotionFormType(self::$DI['app']['url_generator']);
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\DisplayFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class DisplayFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new DisplayFormType();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\EmailFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class EmailFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new EmailFormType();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\ExecutablesFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class ExecutablesFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new ExecutablesFormType();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\FlickrFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class FlickrFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new FlickrFormType(self::$DI['app']['url_generator']);
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\FtpExportFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class FtpExportFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new FtpExportFormType();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\HomepageFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class HomepageFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new HomepageFormType();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\HttpServerFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class HttpServerFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new HttpServerFormType(array('fr_FR' => 'french'));
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\MainConfigurationFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class MainConfigurationFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new MainConfigurationFormType(array('fr_FR' => 'french'), self::$DI['app']['url_generator']);
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\MaintenanceFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class MaintenanceFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new MaintenanceFormType();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\ModulesFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class ModulesFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new ModulesFormType();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\PhraseanetClientAPIFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class PhraseanetClientAPIFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new PhraseanetClientAPIFormType();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\PushFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class PushFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new PushFormType();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\RegistrationFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class RegistrationFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new RegistrationFormType();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\ReportFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class ReportFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new ReportFormType();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\RobotsFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class RobotsFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new RobotsFormType();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\SearchEngineFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class SearchEngineFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new SearchEngineFormType();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\StorageFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class StorageFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new StorageFormType();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\WebservicesFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class WebservicesFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new WebservicesFormType();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Form\Configuration\YoutubeFormType;
|
||||||
|
use Alchemy\Phrasea\Model\Entities\Task;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||||
|
|
||||||
|
class YoutubeFormTypeTest extends FormTestCase
|
||||||
|
{
|
||||||
|
public function getForm()
|
||||||
|
{
|
||||||
|
return new YoutubeFormType(self::$DI['app']['url_generator']);
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user