One bundle, two domains (Marketing Programs and Smart Links), one naming scheme.\nNothing in the database changed (no tables, columns, URLs or stored data);\nthe runtime was rebuilt and verified live.\n\n- Route names mautic_smartlinks_* -> mt3s_smartlinks_* (paths unchanged);\n the menu ids follow\n- Model service aliases collapsed to one canonical alias per model:\n mautic.mt3smarketingprogram.model.<entity> (core's mautic.<x>.model.<x>\n pattern), so getModel('mt3smarketingprogram.smart_link'); the dead\n mt3s.* and mautic.mt3smp.*-era aliases are gone\n- Translation keys mautic.smartlinks.* -> mt3s.smart_links.*\n (mautic.config.tab.smartlinksconfig stays: core derives it)\n- Settings parameters smartlinks_utm_config/smartlinks_config ->\n mt3s_smart_links_utm_config/mt3s_smart_links_config, with both legacy\n keys (smartlinks_* of the standalone bundle, utm_manager_* of the\n UtmManagerBundle era) still readable until the settings are saved again\n- JS loader prefixes smartlinksSmartLink/smartlinksUtmTaxonomy ->\n mt3sMpSmartLink/mt3sMpUtmTaxonomy (the mt3sMp* family of the program\n domain)\n- Integration/Support/ConfigSupport -> SmartlinksConfigSupport; integration\n display names aligned ('MT3S Marketing Program' / 'Smart Links'); the\n dead mautic.plugin.smartlinks.name catalog keys removed\n- phpunit suite renamed UtmManagerBundle -> MT3SMarketingProgramBundle;\n version 0.18.1\n\nVerified: full php -l, 90/90 unit tests (phpunit 11.5 phar), cache clear +\nwarm + assets regenerate + plugins reload (as www-data), live: both lists\nand forms (mauticContent mt3sMpSmartLink/mt3sMpUtmTaxonomy), both config\ntabs, the menu labels, the program pages (regression), the public /l/y32b\nredirect through the legacy utm_manager_* settings (302 with the taxonomy's\nUTM values, wrong host and unknown slug 404), all ini catalogs parse, zero\nnew log errors.
72 lines
3.7 KiB
Twig
72 lines
3.7 KiB
Twig
{% extends '@MauticCore/Default/content.html.twig' %}
|
|
|
|
{% block mauticContent %}mt3sMpSmartLink{% endblock %}
|
|
|
|
{% block headerTitle %}
|
|
{% if form.vars.data.id %}
|
|
{{ 'mt3s.smart_links.smart_links.header.edit'|trans({'%slug%': form.vars.data.slug}) }}
|
|
{% else %}
|
|
{{ 'mt3s.smart_links.smart_links.header.new'|trans }}
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{{ form_start(form) }}
|
|
<div class="box-layout">
|
|
<div class="col-md-9 height-auto bdr-r">
|
|
<div class="pa-md">
|
|
{# Short link preview: the slug the user types, on the domain set in Smart Links Settings. #}
|
|
<div class="well well-sm" id="smartLinkDomainReminder"
|
|
data-domain="{{ form.vars.smart_link_domain }}"
|
|
data-separator="{{ form.vars.smart_link_separator }}"
|
|
data-lowercase="{{ form.vars.smart_link_lowercase ? '1' : '0' }}">
|
|
<span class="text-muted">{{ 'mt3s.smart_links.smart_links.domain.reminder'|trans }}</span>
|
|
<code id="smartLinkPreview">{{ form.vars.smart_link_domain ? form.vars.smart_link_domain ~ '/l/' : '' }}{{ form.vars.smart_link_slug }}</code>
|
|
</div>
|
|
|
|
<div class="input-group smart-link-slug-group">
|
|
{{ form_row(form.slug) }}
|
|
{% if not form.vars.smart_link_is_saved %}
|
|
<span class="input-group-btn">
|
|
<button type="button" class="btn btn-default" id="smartLinkGenerateSlug"
|
|
data-generated="{{ form.vars.smart_link_generated }}"
|
|
title="{{ 'mt3s.smart_links.smart_links.slug.generate.tooltip'|trans }}">
|
|
<i class="ri-refresh-line"></i>
|
|
{{ 'mt3s.smart_links.smart_links.slug.generate'|trans }}
|
|
</button>
|
|
</span>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{# The UTM taxonomy of the link: its allowed values drive the fields on the right. #}
|
|
{{ form_row(form.taxonomy) }}
|
|
|
|
{{ form_row(form.redirectType) }}
|
|
<div id="smartLinkDestinationUrlWrapper"{% if form.vars.data.redirectType.value == 'mautic' %} class="hide"{% endif %}>
|
|
{{ form_row(form.destinationUrl) }}
|
|
</div>
|
|
<div id="smartLinkMauticDestinationWrapper"{% if form.vars.data.redirectType.value != 'mautic' %} class="hide"{% endif %}>
|
|
{{ form_row(form.destination) }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3 height-auto">
|
|
<div class="pr-lg pl-lg pt-md pb-md">
|
|
<h4>{{ 'mt3s.smart_links.smart_links.utm_parameters'|trans }}</h4>
|
|
<p class="text-muted small">{{ 'mt3s.smart_links.smart_links.utm_parameters.help'|trans }}</p>
|
|
{# One fieldset per taxonomy: Mautic's data-show-on switcher shows the one of the
|
|
chosen taxonomy (the container carries the col- class the switcher toggles). #}
|
|
{% for taxonomyId, fieldset in form.vars.smart_link_utm_fieldsets %}
|
|
<div class="col-xs-12 smart-link-utm-fields" data-show-on="{{ {(form.taxonomy.vars.id): taxonomyId}|json_encode|e('html_attr') }}">
|
|
{% for key in fieldset.keys %}
|
|
{{ form_row(form.utmParameters[fieldset.prefix ~ key]) }}
|
|
{% endfor %}
|
|
</div>
|
|
{% endfor %}
|
|
{% do form.utmParameters.setRendered() %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{ form_end(form) }}
|
|
{% endblock %}
|