Skip to content

Commit

Permalink
fix dropdown recursion (#775)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rom1-B authored Mar 20, 2024
1 parent 57b6482 commit 73365b2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion templates/fields.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@
{% if field['multiple'] %}
{% set dropdown_options = dropdown_options|merge({'multiple': true}) %}
{% endif %}
{% if item.isRecursive() %}
{% set dropdown_options = dropdown_options|merge({'entity_sons': true}) %}
{% endif %}
{% if "dropdowns_id" in name %}
{% set dropdown_itemtype = call("getItemtypeForForeignKeyField", [name]) %}
{% else %}
Expand All @@ -116,7 +119,7 @@
{% set dropdown_options = {'condition': field['dropdown_condition'], 'entity': item.getEntityID()} %}
{% if field['dropdown_class'] == 'User' %}
{% set dropdown_options = dropdown_options|merge({'entity': -1, 'right': 'all'}) %}
{% elseif field['dropdown_class'] == 'Entity' %}
{% elseif field['dropdown_class'] == 'Entity' or item.isRecursive() %}
{% set dropdown_options = dropdown_options|merge({'entity_sons': true}) %}
{% endif %}
{% if field['multiple'] %}
Expand Down

0 comments on commit 73365b2

Please sign in to comment.