mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
create form for uploading logo
refactor admin setup layout for adding logo personalisation section
This commit is contained in:
@@ -56,6 +56,27 @@ class GeneralFormType extends AbstractType
|
||||
'attr' => ['min' => -1],
|
||||
'constraints' => new GreaterThanOrEqual(['value' => -1]),
|
||||
]);
|
||||
$builder->add('personalize-logo-choice', new PersonalisationLogoForm(), [
|
||||
'label' => 'Design of personalization logo section',
|
||||
'attr' => [
|
||||
'id' => 'personalize-logo-container'
|
||||
]
|
||||
]);
|
||||
// $builder->add('personalize-logo-choice', 'choice', [
|
||||
// 'label' => 'Design of personalization logo section',
|
||||
// 'choices' => ['original' => 'original', 'personalize' => 'personalize'],
|
||||
// 'required'=>true,
|
||||
// 'expanded'=>true,
|
||||
// 'multiple'=>false,
|
||||
// 'placeholder'=>false,
|
||||
// 'attr' => [
|
||||
// 'id' => 'personalize-logo-container'
|
||||
// ]
|
||||
//
|
||||
// ]);
|
||||
// $builder->add('personalize-logo', 'file', [
|
||||
// 'label' => false,
|
||||
// ]);
|
||||
}
|
||||
|
||||
public function getName()
|
||||
|
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2014 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 Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class PersonalisationLogoForm extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder->add('originalChoiceInput', 'choice', [
|
||||
'label' => false,
|
||||
'choices' => ['original' => 'original'],
|
||||
'expanded' => true,
|
||||
|
||||
]);
|
||||
$builder->add('personaliseChoiceInput', 'choice', [
|
||||
'label' => false,
|
||||
'choices' => ['personalise' => 'personalise'],
|
||||
'expanded' => true,
|
||||
|
||||
]);
|
||||
$builder->add('personalizeLogoInput', 'file', [
|
||||
'label' => false,
|
||||
]);
|
||||
$builder->add('logoChoice', 'hidden', [
|
||||
'label' => false,
|
||||
]);
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user