Selaa lähdekoodia

Correctifs

tags/0.1
Guillaume 3 vuotta sitten
vanhempi
commit
a3d6e93a14
4 muutettua tiedostoa jossa 29 lisäystä ja 17 poistoa
  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 Näytä tiedosto

@@ -4,7 +4,7 @@ namespace Lc\SovBundle\Form\Type\Crud;

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

+ 12
- 9
Form/Type/User/ProfileFormType.php Näytä tiedosto

@@ -4,8 +4,7 @@ namespace Lc\SovBundle\Form\Type\User;

use Lc\SovBundle\DataTransformer\FileManagerTypeToDataTransformer;
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 Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
@@ -25,6 +24,8 @@ class ProfileFormType extends AbstractType

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

$builder->add(
'firstname',
TextType::class,
@@ -49,13 +50,15 @@ class ProfileFormType extends AbstractType
)
);

$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(
'submit',

+ 7
- 0
Resources/config/routes.yaml Näytä tiedosto

@@ -1,3 +1,10 @@
_liip_imagine:
resource: "@LiipImagineBundle/Resources/config/routing.yaml"

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

sov_login:
path: /login

+ 9
- 7
Resources/views/adminlte/crud/paginator.html.twig Näytä tiedosto

@@ -26,13 +26,15 @@
</li>

{% 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 %}

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

Loading…
Peruuta
Tallenna