{% extends '@MauticCore/Default/content.html.twig' %} {% block mauticContent %}mt3sMpCallScript{% endblock %} {% block headerTitle %} {% if form.vars.data.id %} {{ 'mt3s.call_script.header.edit'|trans({'%name%': form.vars.data.name}) }} {% else %} {{ 'mt3s.call_script.header.new'|trans }} {% endif %} {% endblock %} {# One {value, label} option of an outcome's choices. #} {% macro option_row(option) %}
  • {{ form_row(option.value) }}
    {{ form_row(option.label) }}
  • {% endmacro %} {# One outcome: its label, the data type the agent records it with, and the options of the choice types. Adding, removing and reordering is handled by Assets/js/mt3s-mp-program.js through the program-collection-* classes (the options are a nested collection of the same kind). #} {% macro outcome_row(outcome) %}
  • {{ form_row(outcome.label) }}
    {{ form_row(outcome.inputType) }}
    {{ 'mt3s.call_script.outcome.options'|trans }}

    {{ 'mt3s.call_script.outcome.options.empty'|trans }}

      {% for option in outcome.options %} {{ _self.option_row(option) }} {% endfor %}
    {{ form_widget(outcome.position) }}
  • {% endmacro %} {% block content %} {{ form_start(form) }}
    {{ form_row(form.name) }} {{ form_row(form.description) }} {{ form_row(form.script) }}

    {{ 'mt3s.call_script.outcome.list'|trans }}

    {{ form_errors(form.outcomes) }}

    {{ 'mt3s.call_script.outcome.empty'|trans }}

      {% for outcome in form.outcomes %} {{ _self.outcome_row(outcome) }} {% endfor %}
    {% do form.outcomes.setRendered %}
    {{ form_row(form.owner) }} {{ form_row(form.category) }} {{ form_row(form.isPublished) }} {{ form_row(form.publishUp) }} {{ form_row(form.publishDown) }}

    {{ 'mt3s.call_script.section.calling_window'|trans }}

    {{ form_row(form.callingDays) }} {{ form_row(form.callingFrom) }} {{ form_row(form.callingTo) }} {{ form_row(form.callingTimezoneMode) }} {{ form_row(form.callingTimezone) }}

    {{ 'mt3s.call_script.section.retry_policy'|trans }}

    {{ form_row(form.retryMaxAttempts) }} {{ form_row(form.retryDelayMinutes) }} {{ form_row(form.retryBackoff) }}
    {{ form_row(form.buttons) }} {# render_rest is false, so the hidden CSRF token must be rendered explicitly. #} {{ form_widget(form._token) }} {{ form_end(form, {'render_rest': false}) }} {% endblock %}