Browse Source

Correctifs

tags/0.1
Guillaume 3 years ago
parent
commit
a3d6e93a14
4 changed files with 29 additions and 17 deletions
  1. +1
    -1
      Form/Type/Crud/FileManagerType.php
  2. +12
    -9
      Form/Type/User/ProfileFormType.php
  3. +7
    -0
      Resources/config/routes.yaml
  4. +9
    -7
      Resources/views/adminlte/crud/paginator.html.twig

+ 1
- 1
Form/Type/Crud/FileManagerType.php View File



use Lc\SovBundle\DataTransformer\FileManagerTypeToDataTransformer; use Lc\SovBundle\DataTransformer\FileManagerTypeToDataTransformer;
use Lc\SovBundle\Entity\File\File; use Lc\SovBundle\Entity\File\File;
use Lc\SovBundle\Doctrine\Extension\FileInterface;
use Lc\SovBundle\Model\File\FileInterface;
use Lc\SovBundle\Doctrine\EntityManager; use Lc\SovBundle\Doctrine\EntityManager;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\DataTransformerInterface; use Symfony\Component\Form\DataTransformerInterface;

+ 12
- 9
Form/Type/User/ProfileFormType.php View File



use Lc\SovBundle\DataTransformer\FileManagerTypeToDataTransformer; use Lc\SovBundle\DataTransformer\FileManagerTypeToDataTransformer;
use Lc\SovBundle\Doctrine\EntityManager; use Lc\SovBundle\Doctrine\EntityManager;
use Lc\SovBundle\Entity\File\File;
use Lc\SovBundle\Doctrine\Extension\FileInterface;
use Lc\SovBundle\Model\File\FileInterface;
use Lc\SovBundle\Model\User\UserInterface; use Lc\SovBundle\Model\User\UserInterface;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\EmailType; use Symfony\Component\Form\Extension\Core\Type\EmailType;


public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
{ {
$entityName = $this->em->getEntityName(UserInterface::class) ;

$builder->add( $builder->add(
'firstname', 'firstname',
TextType::class, TextType::class,
) )
); );


$builder->add(
'phone',
TextType::class,
array(
'label' => 'Téléphone'
)
);
if(property_exists($entityName, 'phone')) {
$builder->add(
'phone',
TextType::class,
array(
'label' => 'Téléphone'
)
);
}


$builder->add( $builder->add(
'submit', 'submit',

+ 7
- 0
Resources/config/routes.yaml View File

_liip_imagine:
resource: "@LiipImagineBundle/Resources/config/routing.yaml"

artgris_bundle_file_manager:
resource: "@ArtgrisFileManagerBundle/Controller"
type: annotation
prefix: /manager


sov_login: sov_login:
path: /login path: /login

+ 9
- 7
Resources/views/adminlte/crud/paginator.html.twig View File

</li> </li>


{% for page in paginator.pageRange %} {% for page in paginator.pageRange %}
<li class="page-item {{ page == paginator.currentPage ? 'active' }} {{ page is null ? 'disabled' }}">
{% if page is null %}
<span class="page-link">&hellip;</span>
{% else %}
<a class="page-link" href="{{ paginator.generateUrlForPage(page) }}">{{ page }}</a>
{% endif %}
</li>
{% if page != 0 %}
<li class="page-item {{ page == paginator.currentPage ? 'active' }} {{ page is null ? 'disabled' }}">
{% if page is null %}
<span class="page-link">&hellip;</span>
{% else %}
<a class="page-link" href="{{ paginator.generateUrlForPage(page) }}">{{ page }}</a>
{% endif %}
</li>
{% endif %}
{% endfor %} {% endfor %}


<li class="page-item {{ not paginator.hasNextPage ? 'disabled' }}"> <li class="page-item {{ not paginator.hasNextPage ? 'disabled' }}">

Loading…
Cancel
Save