You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
156 lines
8.7 KiB
156 lines
8.7 KiB
{% set bodyClass = 'bg-white' %}
|
|
{% set mainClass = 'wrapper' %}
|
|
|
|
{% extends 'layout.twig' %}
|
|
{% block content %}
|
|
<main class="wrapper">
|
|
<div class="cabinet-card cabinet-card--green-white cabinet__subscription-mobile">
|
|
<div class="cabinet-card__content">
|
|
<p class="cabinet-card__title">
|
|
{{ function('pll_e', 'Feed subscription') }}
|
|
</p>
|
|
<div class="cabinet-card__element">
|
|
<p class="cabinet-card__text">{{ function('pll_e', 'Weekly food delivery for your pet') }}</p>
|
|
</div>
|
|
<div class="cabinet-card__element">
|
|
<button class="button button--gradient button--high-46 form-sub__btn">
|
|
{{ function('pll_e', 'Get details') }}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="cabinet__control cabinet__control--column">
|
|
<a href="{{ fn('wc_get_page_permalink', 'myaccount') }}" class="to-know to-know--start button--100-perc to-know--background-none">
|
|
<p>{{ fn('pll_e', 'Перейти в профиль') }}</p>
|
|
</a>
|
|
<div class="form-input__tabs form-input__tabs--control form-input__tabs--white">
|
|
<a href="{{ fn('wc_get_endpoint_url', 'orders', '', fn('wc_get_page_permalink', 'myaccount')) }}" class="form-input-tabs__button {% if fn('is_wc_endpoint_url','orders') %}active{% endif %}">
|
|
{{ fn('pll_e', 'Заказы') }}
|
|
</a>
|
|
<a href="{{ fn('wc_get_page_permalink', 'myaccount') }}subscriptions" class="form-input-tabs__button {% if fn('is_wc_endpoint_url','subscriptions') %}active{% endif %}">
|
|
{{ fn('pll_e', 'Подписки') }}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="cabinet">
|
|
<div class="cabinet__profile cabinet-content {% if not fn('is_wc_endpoint_url') %}active hide{% endif %}">
|
|
<div class="form-input__tabs form-input__tabs--control form-input__tabs--white">
|
|
|
|
<a href="{{ fn('wc_get_endpoint_url', '', '', fn('wc_get_page_permalink', 'myaccount')) }}" class="form-input-tabs__button {% if not fn('is_wc_endpoint_url') %}active{% endif %}">
|
|
{{ fn('pll_e', 'Заказы') }}
|
|
</a>
|
|
<a href="subscriptions" class="form-input-tabs__button {% if fn('is_wc_endpoint_url','subscriptions') %}active{% endif %}">
|
|
{{ fn('pll_e', 'Подписки') }}
|
|
</a>
|
|
</div>
|
|
|
|
<div class="cabinet-card cabinet-card--green">
|
|
<div class="cabinet-card__content">
|
|
<div class="cabinet-card__element">
|
|
<p class="cabinet-card__text {% if not first_name and not last_name %}cabinet-card__text--grey{% endif %}">
|
|
{% if first_name or last_name %}
|
|
{{ first_name }} {{ last_name }}
|
|
{% else %}
|
|
{{ function('pll_e', 'Name is not set') }}
|
|
{% endif %}
|
|
</p>
|
|
</div>
|
|
|
|
<div class="cabinet-card__element">
|
|
<p class="cabinet-card__label">{{ function('pll_e', 'Phone') }}:</p>
|
|
<p class="cabinet-card__text {% if not phone %}cabinet-card__text--grey{% endif %}">
|
|
{% if phone %}
|
|
{{ phone }}
|
|
{% else %}
|
|
{{ function('pll_e', 'Not filled') }}
|
|
{% endif %}
|
|
</p>
|
|
</div>
|
|
|
|
<div class="cabinet-card__element">
|
|
<p class="cabinet-card__label">{{ function('pll_e', 'Email') }}:</p>
|
|
{% if email %}
|
|
<p class="cabinet-card__text">{{ email }}</p>
|
|
{% if activated %}
|
|
<p class="cabinet-card__status cabinet-card__status--chek">{{ function('pll_e', 'Email is verified') }}</p>
|
|
{% else %}
|
|
<p class="cabinet-card__status cabinet-card__status--cancelled">{{ function('pll_e', 'Email is not verified') }}</p>
|
|
<form class="email_approve_form">
|
|
<input type="hidden" name="action" value="email_activate">
|
|
<button type="submit" class="cabinet-card__confirm">{{ function('pll_e', 'Verify') }}</button>
|
|
</form>
|
|
{% if uuid %}
|
|
<p class="cabinet-card__status">{{ function('pll_e', 'Email with verification link is sent to your email.') }}</p>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% else %}
|
|
<div class="cabinet-card__label">
|
|
<form class="email_link_form">
|
|
<input type="hidden" name="action" value="email_link">
|
|
<div class="cabinet-card_linked-email">
|
|
<input class="form__input" type="text" name="email" placeholder="example@example.com" required>
|
|
</div>
|
|
<button class="cabinet-card__confirm" type="submit">{{ function('pll_e', 'Link email') }}</button>
|
|
</form>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="cabinet-card__element">
|
|
<p class="cabinet-card__label">{{ function('pll_e', 'Linked accounts') }}:</p>
|
|
<p class="cabinet-card__text cabinet-accounts">
|
|
{% if tg_account %}
|
|
<svg width="40px" height="40px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid">
|
|
<g>
|
|
<path d="M128,0 C57.307,0 0,57.307 0,128 L0,128 C0,198.693 57.307,256 128,256 L128,256 C198.693,256 256,198.693 256,128 L256,128 C256,57.307 198.693,0 128,0 L128,0 Z" fill="#40B3E0"></path>
|
|
<path d="M190.2826,73.6308 L167.4206,188.8978 C167.4206,188.8978 164.2236,196.8918 155.4306,193.0548 L102.6726,152.6068 L83.4886,143.3348 L51.1946,132.4628 C51.1946,132.4628 46.2386,130.7048 45.7586,126.8678 C45.2796,123.0308 51.3546,120.9528 51.3546,120.9528 L179.7306,70.5928 C179.7306,70.5928 190.2826,65.9568 190.2826,73.6308" fill="#FFFFFF"></path>
|
|
<path d="M98.6178,187.6035 C98.6178,187.6035 97.0778,187.4595 95.1588,181.3835 C93.2408,175.3085 83.4888,143.3345 83.4888,143.3345 L161.0258,94.0945 C161.0258,94.0945 165.5028,91.3765 165.3428,94.0945 C165.3428,94.0945 166.1418,94.5735 163.7438,96.8115 C161.3458,99.0505 102.8328,151.6475 102.8328,151.6475" fill="#D2E5F1"></path>
|
|
<path d="M122.9015,168.1154 L102.0335,187.1414 C102.0335,187.1414 100.4025,188.3794 98.6175,187.6034 L102.6135,152.2624" fill="#B5CFE4"></path>
|
|
</g>
|
|
</svg>
|
|
{% else %}
|
|
<script async src="https://telegram.org/js/telegram-widget.js?2" data-telegram-login="{{ bot_username }}" data-size="large" data-onauth="linkTelegram(user)"></script>
|
|
{% endif %}
|
|
</p>
|
|
</div>
|
|
|
|
<div class="cabinet-card__element">
|
|
<div class="cabinet-card__block-buttons">
|
|
<button class="cabinet-card__button user-edit-open">{{ function('pll_e', 'Edit') }}</button>
|
|
<a href="{{ fn('wp_logout_url', fn('home_url')) }}" class="cabinet-card__button">{{ function('pll_e', 'Logout') }}</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% if pets %}
|
|
{% for pet in pets %}
|
|
{% include 'profile/pet-card.twig' with { 'item': pet } %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
<div class="cabinet-card cabinet-card--green">
|
|
<div class="cabinet-card__content">
|
|
<button class="cabinet-card__block-add-pets form-open" data-form="form-pet">
|
|
<div class="cabinet-card-add-pets__circle">
|
|
<img src="{{ theme.link }}/static/img/svg/main/plus-grey.svg" alt="">
|
|
</div>
|
|
<p class="cabinet-card-add-pets__text">{{ function('pll_e', 'Add a pet') }}</p>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{% block profile_content %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
</main>
|
|
|
|
{% include 'profile/profile-modals.twig' %}
|
|
|
|
{% endblock %} |