Spaces:
No application file
No application file
{% extends "@MauticCore/FormTheme/form_tabbed.html.twig" %} | |
{% form_theme form _self %} | |
{% block channel_row %} | |
{% if form.children.channel is defined %} | |
{% set channel = form.children.channel.vars.data %} | |
{% set enabled = form.children.isEnabled.vars.data %} | |
{% set channelContent = customContent('channel.right', _context) %} | |
{% set leftCol = channelContent ? 6 : 12 %} | |
{% set enableCol = channelContent ? '' : 'col-md-2' %} | |
{% set propsCol = channelContent ? '' : 'col-md-10' %} | |
{{ form_row(form.children.channel) }} | |
{{ form_errors(form) }} | |
<div class="row"> | |
<div class="col-md-{{ leftCol }}"> | |
<div class="{{ enableCol }}"> | |
{{ form_row(form.children.isEnabled) }} | |
</div> | |
<div class="{{ propsCol }}"> | |
<div class="message_channel_properties_{{ channel }}{% if not enabled %} hide{% endif %}"> | |
{% if form.children.channelId is defined %} | |
{{ form_row(form.children.channelId) }} | |
{% endif %} | |
{% if form.children.properties is defined and form.children.properties is not empty %} | |
{{ form_row(form.children.properties) }} | |
{% endif %} | |
</div> | |
</div> | |
</div> | |
{% if channelContent %} | |
<div class="col-md-6"> | |
{{ channelContent }} | |
</div> | |
{% endif %} | |
</div> | |
{% endif %} | |
{% endblock %} | |
{# active, id, name, content #} | |
{% set tabs, active = [], true %} | |
{% set _channel = '' %} | |
{% for channel, config in channels %} | |
{% if form.channels[channel] is defined %} | |
{% set tab = { | |
'active' : active, | |
'id' : 'channel_' ~ channel, | |
'name' : config.label, | |
'content' : form_row(form.channels[channel]), | |
'containerAttr' : { | |
'style' : 'min-height: 200px;', | |
}, | |
} %} | |
{% if formContainsErrors(form.channels[channel]) %} | |
{% set tab = tab|merge({'class': 'text-danger', 'icon': 'ri-alert-fill'}) %} | |
{% elseif form.channels[channel].isEnabled.vars.data %} | |
{% set tab = tab|merge({'published': true}) %} | |
{% endif %} | |
{% set tabs, active = tabs|merge([tab]), false %} | |
{% endif %} | |
{% endfor %} | |
{% set formTabs = tabs %} | |
{% block aboveTabsContent %} | |
<div class="pa-md row"> | |
<div class="col-md-12"> | |
{{ form_row(form.name) }} | |
{{ form_row(form.description) }} | |
</div> | |
</div> | |
{% endblock %} | |
{% block rightFormContent %} | |
{{ form_row(form.category) }} | |
{{ form_row(form.isPublished) }} | |
{{ form_row(form.publishUp) }} | |
{{ form_row(form.publishDown) }} | |
{% endblock %} | |
{% block _content %}{% endblock %} |