Skip to content

Commit

Permalink
do not call dynamic macro using attribute()
Browse files Browse the repository at this point in the history
This fixes boekkooi#47.
  • Loading branch information
xabbuh authored Mar 8, 2017
1 parent 7ee1b98 commit 9fd771a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Resources/views/Form/macros.js.twig
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@
{%- endif -%}

{%- for condition in rule.conditions -%}
{{ attribute(macro_conditions, condition.macro, [condition, rule]) }}
{% if condition.macro == 'field_dependency' %}
{{ macro_conditions.field_dependency(condition, rule) }}
{% elseif condition.macro == 'field_value_dependency' %}
{{ macro_conditions.field_value_dependency(condition, rule) }}
{% endif %}
{%- endfor -%}

return true;
Expand Down

0 comments on commit 9fd771a

Please sign in to comment.