{# Edit action form component #}
{% if action %}
{{ action['action'] | format_name }}
{% if not action['args'] == None %}
{% if not action['args'].__class__.__name__ == 'dict' %}
{% else %} {{ forms.hidden_tag() }} {% for field in forms %} {% if field.type not in ['CSRFTokenField'] and field.name != 'return' and field.name != 'batch_action' and field.name != 'consolidate_batch_args' %}
{% if field.type == "BooleanField" %} {{ field(class="form-check-input") }} {% elif field.type == "FlexibleEnumField" %} {% for key in field.choices %} {% endfor %} {% else %} {{ field(class="form-control", list="variables_datalist", oninput="updateConsolidateVisibility(this)") }} {% endif %}
{% if forms.arg_types and forms.arg_types.get(field.name) == 'list' %} {% set is_consolidated = field.name in (action.get('consolidate_batch_args') or []) %} {# Initial visibility calculation #} {% set is_visible = forms.batch_action.data and field.data and field.data.startswith('#') %}
Consolidate
{% endif %} {% endif %} {% endfor %} {% for var_name in script.get_autocomplete_variables(before_id=action.id) %} {% endfor %} {% endif %} {# Dynamic Arguments Section #} {% set extra_args = [] %} {% set form_fields = [] %} {% for field in forms %} {% set _ = form_fields.append(field.name) %} {% endfor %} {% if action['args'] and action['args'] is mapping %} {% for key, value in action['args'].items() %} {% if key not in form_fields %} {% set _ = extra_args.append((key, value)) %} {% endif %} {% endfor %} {% endif %} {% if forms.has_kwargs or extra_args %} {#
Additional Parameters
#}
{% for key, value in extra_args %}
{% endfor %}
{% if forms.has_kwargs %} {% endif %} {% endif %} {# Manual rendering of batch_action and return #} {% if forms.batch_action %}
{{ forms.batch_action(class="form-check-input", onchange="handleBatchActionChange(this)") }}
{% endif %} {% if forms.return %}
{{ forms.return(class="form-control") }}
{% endif %}
{% endif %}
{% endif %}