@@ -6,7 +6,7 @@ use EasyCorp\Bundle\EasyAdminBundle\Field\FormField; | |||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | |||
use Lc\SovBundle\Controller\AbstractAdminController; | |||
use Lc\SovBundle\Factory\Newsletter\NewsletterFactory; | |||
use Lc\SovBundle\Field\ToggleField; | |||
use Lc\SovBundle\Field\BooleanField; | |||
use Lc\SovBundle\Field\CKEditorField; | |||
use Lc\SovBundle\Field\StatusField; | |||
@@ -4,6 +4,7 @@ namespace Lc\SovBundle\Field; | |||
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | |||
use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait; | |||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType; | |||
use Symfony\Component\Form\Extension\Core\Type\TextType; | |||
/** | |||
@@ -19,7 +20,7 @@ final class BooleanField implements FieldInterface | |||
->setProperty($propertyName) | |||
->setLabel($label) | |||
->setTemplatePath('@LcSov/adminlte/crud/field/boolean.html.twig') | |||
->setFormType(TextType::class); | |||
->setFormType(CheckboxType::class); | |||
} | |||
} |
@@ -4,9 +4,7 @@ namespace Lc\SovBundle\Field; | |||
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; | |||
use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait; | |||
use Lc\SovBundle\Form\Type\FileManagerType; | |||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | |||
use Symfony\Component\Form\Extension\Core\Type\TextType; | |||
/** | |||
* @author La clic ! <contact@laclic.fr> | |||
@@ -31,7 +29,6 @@ final class StatusField implements FieldInterface | |||
if (!$templateToggle) { | |||
$template = 'status.html.twig'; | |||
} | |||
$field->setTemplatePath('@LcSov/adminlte/crud/field/' . $template); | |||
return $field; |
@@ -3,8 +3,8 @@ nav.main-header { | |||
ul.navbar-nav { | |||
li.nav-item-user-menu { | |||
.dropdown-menu { | |||
position: absolute ; | |||
z-index: 1000 ; | |||
position: absolute; | |||
z-index: 1000; | |||
} | |||
} | |||
@@ -16,4 +16,16 @@ nav.main-header { | |||
} | |||
} | |||
} | |||
} | |||
.main-sidebar p { | |||
font-size: 0.8rem; | |||
} | |||
.nav-link { | |||
padding: 0.5rem 0.5rem; | |||
} | |||
.nav-treeview .nav-link { | |||
padding: 0.2rem 0.5rem 0.2rem 1.2rem; | |||
} |
@@ -1,4 +1,3 @@ | |||
{% if field.value == 1 %} | |||
<div class="badge badge-success">En ligne</div> | |||
{% else %} |
@@ -1,6 +1,6 @@ | |||
{% set item = entity.instance %} | |||
{% set property_name = field.getProperty() %} | |||
{% set id_toggle = 'toogle-'~item.id~'-'~property_name %} | |||
{% set id_toggle = 'toggle-'~item.id~'-'~property_name %} | |||
<div class="custom-control custom-switch custom-switch-on-success custom-switch-off-default" | |||
data-url="{{ ea_url({crudAction: 'edit', entityId: item.id, fieldName: property_name }) }}"> |