* add servicesDisabled field for groups and for global configuration * fixup! add servicesDisabled field for groups and for global configuration * comment libcurl upgrade to fix ci temporarly * upgrade caddy version * review * fix test * feat: add paying membership option (#714) * feat: add paying membership option * fix: ci * fix: phpstan + review * fix: eslint ci
17 lines
1 KiB
Twig
17 lines
1 KiB
Twig
{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
|
|
{# @var field \EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto #}
|
|
{# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
|
|
{% trans_default_domain 'EasyAdminBundle' %}
|
|
|
|
{% if ea.crud.currentAction == 'detail' or not field.customOptions.get('renderAsSwitch') %}
|
|
<span class="badge {{ field.value == true ? 'badge-boolean-true' : 'badge-boolean-false' }}">
|
|
{{ (field.value == true ? 'label.true' : 'label.false')|trans }}
|
|
</span>
|
|
{% else %}
|
|
<div class="form-check form-switch">
|
|
<input type="checkbox" class="form-check-input" id="{{ field.uniqueId }}" {{ field.value == true ? 'checked' }}
|
|
data-toggle-url="{{ field.customOptions.get('toggleUrl') }}"
|
|
{{ field.formTypeOption('disabled') == true ? 'disabled' }} autocomplete="off" data-controller="admin-parentgroup" data-admin-parentgroup-target="servicesEnabledField">
|
|
<label class="form-check-label" for="{{ field.uniqueId }}"></label>
|
|
</div>
|
|
{% endif %}
|