{# Variables - lead - fields - form #} {% extends '@MauticCore/Default/content.html.twig' %} {% block mauticContent %}lead{% endblock %} {% block headerTitle %} {% if lead.id %} {{ 'mautic.lead.lead.header.edit'|trans({ '%name%': lead.primaryIdentifier|trans, }) }} {% else %} {{ 'mautic.lead.lead.header.new'|trans }} {% endif %} {% endblock %} {% block content %} {% set groups = fields|keys|sort %} {% set img = leadGetAvatar(lead) %} {{ form_start(form) }}
{{ form_label(form.preferred_profile_image) }} {{ form_widget(form.preferred_profile_image) }}
{{ form_widget(form.custom_avatar) }} {{ form_errors(form.custom_avatar) }}

{% for group in groups %} {% if fields[group] is defined %} {% set groupFields = fields[group] %} {% if groupFields is not empty %}
{% if not lead.id %} {{ include('@MauticCore/Notification/inline_notification.html.twig', { 'title': 'mautic.contact.import.tip.title', 'content': 'mautic.contact.import.tip.description', 'alert_type': 'info', 'dismissible': true, 'action_label': 'mautic.contact.import.tip.button', 'action_link': path('mautic_import_action', {'object': 'contacts', 'objectAction': 'new'}) }) }} {% endif %}

{{ ('mautic.lead.field.group.'~group)|trans }}

{% if 'core' == group %} {% if form.title is defined or form.firstname is defined or form.lastname is defined %}
{% if form.title is defined %}
{{ form_widget(form.title, {'attr': {'placeholder': form.title.vars.label}}) }}
{% endif %} {% if form.firstname is defined %}
{{ form_widget(form.firstname, {'attr': {'placeholder': form.firstname.vars.label}}) }}
{% endif %} {% if form.lastname is defined %}
{{ form_widget(form.lastname, {'attr': {'placeholder': form.lastname.vars.label}}) }}
{% endif %}

{% endif %}
{{ form_widget(form.email, {'attr': {'placeholder': form.email.vars.label}}) }}

{% if form.companies is defined %}
{{ form_widget(form.companies) }}
{% endif %} {% if form.position is defined %}
{{ form_widget(form.position, {'attr': {'placeholder': form.position.vars.label}}) }}
{% endif %}

{% if form.address1 is defined or form.address2 is defined or form.city is defined or form.state is defined or form.zipcode is defined or form.country is defined %}
{% if form.address1 is defined %}
{{ form_widget(form.address1, {'attr': {'placeholder': form.address1.vars.label}}) }}
{% endif %} {% if form.address2 is defined %}
{{ form_widget(form.address2, {'attr': {'placeholder': form.address2.vars.label}}) }}
{% endif %}
{% if form.city is defined %}
{{ form_widget(form.city, {'attr': {'placeholder': form.city.vars.label}}) }}
{% endif %} {% if form.state is defined %}
{{ form_widget(form.state, {'attr': {'placeholder': form.state.vars.label}}) }}
{% endif %}
{% if form.zipcode is defined %}
{{ form_widget(form.zipcode, {'attr': {'placeholder': form.zipcode.vars.label}}) }}
{% endif %} {% if form.country is defined %}
{{ form_widget(form.country, {'attr': {'placeholder': form.country.vars.label}}) }}
{% endif %}

{% endif %} {% if form.attribution is defined and form.attribution_date is defined %}
{{ form_widget(form.attribution, {'attr': {'placeholder': form.attribution.vars.label, 'preaddon': 'ri-cash-line'}}) }}
{{ form_widget(form.attribution_date, {'attr': {'placeholder': form.attribution_date.vars.label}}) }}

{% endif %} {% endif %}
{% for alias, field in groupFields %} {% if 'company' != alias and form[alias] is defined and not form[alias].isRendered %}
{{ form_row(form[alias]) }}
{% else %} {% do form[alias].setRendered %} {% endif %} {% endfor %}
{% if 'core' == group %}
{{ form_label(form.stage) }} {{ form_widget(form.stage) }}

{{ form_label(form.owner) }} {{ form_widget(form.owner) }}
{{ form_label(form.tags) }} {{ form_widget(form.tags) }}
{% endif %}
{% endif %} {% endif %} {% endfor %}
{{ form_end(form) }} {% endblock %}