{% if opts.is_ajax -%} {% set atts = {'data-url': action, 'class': 'ajax-form'} -%} {% else -%} {% set atts = {'action': action} -%} {% endif -%} {% do atts.update({ 'method': method, 'enctype': "multipart/form-data", 'role': 'form' }) -%}