{% from 'utils.html.twig' import ico %}
{% extends 'website/main.template.html.twig' %}
{# SETUP - BILLING REQUIRED FIELDS #}
{% set userCheckoutInfo = (getConfig('use_checkout_info') == enum('CartEnum::YES')) %}
{% set cartCompleteRegistration = (getConfig('cart_complete_registration') == enum('CartEnum::YES')) %}
{% block metaIndex %}
<meta name="robots" content="nofollow">
{% endblock %}
{% block body %}
{% include 'website/includes/search-section.html.twig' %}
{% embed 'website/includes/page-title.html.twig' with { pageTitle: getLanguage('profile', 'profile') }%}
{% block migalhas %}
<a href="{{ path('home') }}">{{ getLanguage('home', 'profile') }}</a> / <a href="#">{{ getLanguage('profile', 'profile') }}</a> / <span>{{ getLanguage('edit_profile_lowercase', 'profile') }}</span>
{% endblock %}
{% endembed %}
<div class="container">
<nav class="abas tab">
<a class="tab-item aba" id="user-detail" href="#user-detail-data">{{ getLanguage('user_data', 'profile') }}</a>
{% if user and user.id != 1 and session.userOrigin is empty %}
<a class="tab-item aba" id="user-authentication" href="#user-authentication-data">{{ getLanguage('user_authentication', 'profile') }}</a>
{% endif %}
{% if existReceiverEAD() %}
<a class="tab-item aba" id="user-payment" href="#user-payment-data">{{ getLanguage('payment', 'profile') }}</a>
{% endif %}
<a class="tab-item aba" id="user-notify" href="#user-notify-data">{{ getLanguage('notifications', 'profile') }}</a>
{% if user.allowReceiver and existReceiverEAD() %}
<a class="tab-item aba" id="user-receivers" href="#user-receivers-data">{{ getLanguage('receivers', 'profile') }}</a>
{% endif %}
</nav>
{# PROFILE EDIT #}
<section id="user-detail-data" class="tab-data">
<div class="bg-box">
{% include 'website/user/profile/user-profile-edit.html.twig' %}
</div>
</section>
{# AUTHENTICATION EDIT #}
{% if user and user.id != 1 and session.userOrigin is empty %}
<section id="user-authentication-data" class="tab-data">
<div class="bg-box">
{% include 'website/user/profile/user-profile-authentication.html.twig' %}
</div>
</section>
{% endif %}
{# PAYMENT #}
{% if existReceiverEAD() %}
<section id="user-payment-data" class="tab-data">
<div class="bg-box">
{% include 'website/user/profile/user-profile-payment.html.twig' %}
</div>
</section>
{% endif %}
{# NOTIFICATIONS #}
<section id="user-notify-data" class="tab-data">
<div class="bg-box">
{% include 'website/user/profile/user-profile-notifications.html.twig' with { by_email: false }%}
</div>
</section>
{# RECEIVERS #}
{% if user.allowReceiver and existReceiverEAD() %}
<section id="user-receivers-data" class="tab-data">
<div class="bg-box">
{% include 'website/user/profile/user-profile-receivers-list.html.twig' %}
</div>
</section>
{% endif %}
</div>
{# TEMPLATE LOADING ROW #}
<template id="template-loading-row">
<tr class="row-loader">
<td>
<span>{{ getLanguage('wait', 'util') }}… <i class="loader">{{ ico('loader-wish') }}</i></span>
</td>
</tr>
</template>
{# MODAL -- CADASTRAR RECEBEDOR #}
{% embed "website/includes/modal.html.twig" with {
'id': 'modal-receiver-create',
'title': getLanguage('add_new_receiver', 'profile'),
'classes': 'modal-wid',
'inistep': 1
}%}
{% block content %}
<div class="form-geral-wrap">
<div class="aviso"><p>…</p></div>
{% include 'website/user/receiver/receiver-form.html.twig' with {'layout': 'modal'} %}
</div>
{% endblock %}
{% endembed %}
{% endblock %}