mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-12 00:09:44 +00:00
Only display active custom fields in form & view
This commit is contained in:
@@ -48,7 +48,7 @@ services:
|
||||
- "@chill.main.helper.translatable_string"
|
||||
tags:
|
||||
- { name: 'chill.custom_field', type: 'choice' }
|
||||
|
||||
|
||||
chill.custom_field.custom_fields_group_linked_custom_fields:
|
||||
class: Chill\CustomFieldsBundle\Form\Type\LinkedCustomFieldsType
|
||||
arguments:
|
||||
@@ -82,3 +82,10 @@ services:
|
||||
- [setContainer, ["@service_container"]]
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
|
||||
chill.custom_field.twig.custom_fields_group_rendering:
|
||||
class: Chill\CustomFieldsBundle\Templating\Twig\CustomFieldsGroupRenderingTwig
|
||||
calls:
|
||||
- [setContainer, ["@service_container"]]
|
||||
tags:
|
||||
- { name: twig.extension }
|
8
Resources/views/CustomFieldsGroup/render.html.twig
Normal file
8
Resources/views/CustomFieldsGroup/render.html.twig
Normal file
@@ -0,0 +1,8 @@
|
||||
{% for customField in cFGroup.activeCustomFields %}
|
||||
{% if customField.type == 'title' %}
|
||||
{{ chill_custom_field_widget(cFData , customField) }}
|
||||
{% else %}
|
||||
<dt>{{ chill_custom_field_label(customField) }}</dt>
|
||||
<dd>{{ chill_custom_field_widget(cFData , customField) }}</dd>
|
||||
{% endif %}
|
||||
{% endfor %}
|
Reference in New Issue
Block a user