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.
839 lines
59 KiB
839 lines
59 KiB
{% extends 'layout.twig' %}
|
|
|
|
{% block content %}
|
|
{% set bodyClass = 'bg-white' %}
|
|
|
|
<main class="wrapper">
|
|
<div class="cabinet-card cabinet-card--green-white cabinet__subscription-mobile">
|
|
<div class="cabinet-card__content">
|
|
<p class="cabinet-card__title">
|
|
<?php echo esc_html__( 'Feed subscription', '_pll_e' ) ?>
|
|
</p>
|
|
<div class="cabinet-card__element">
|
|
<p class="cabinet-card__text"><?php echo esc_html__( 'Weekly food delivery for your pet', '_pll_e' ) ?></p>
|
|
</div>
|
|
|
|
<div class="cabinet-card__element">
|
|
<button class="button button--gradient button--high-46 form-sub__btn">
|
|
<?php echo esc_html__( 'Get details', '_pll_e' ) ?>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="cabinet__control">
|
|
<button class="cabinet-control__button active start" data-cabinet="orders"> <?php echo esc_html__( 'Orders', '_pll_e' ) ?></button>
|
|
<button class="cabinet-control__button" data-cabinet="profile"> <?php echo esc_html__( 'Profile', '_pll_e' ) ?></button>
|
|
</div>
|
|
<div class="cabinet">
|
|
<div class="cabinet__profile cabinet-content">
|
|
<div class="cabinet-card cabinet-card--green">
|
|
<div class="cabinet-card__content">
|
|
<div class="cabinet-card__element">
|
|
<?php
|
|
$first_name = $current_user->user_firstname;
|
|
$last_name = $current_user->user_lastname;?>
|
|
<p class="cabinet-card__text <?php if (!$first_name && !$last_name): ?>cabinet-card__text--grey<?php endif; ?>">
|
|
<?php
|
|
$phone = get_user_meta( $current_user->ID, 'billing_phone', true );
|
|
|
|
if($first_name || $last_name):
|
|
echo $first_name . ' ' . $last_name;
|
|
else:
|
|
?>
|
|
|
|
<?php echo esc_html__( 'Name is not set', '_pll_e' ) ?>
|
|
<?php endif; ?>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="cabinet-card__element">
|
|
<p class="cabinet-card__label"> <?php echo esc_html__( 'Phone', '_pll_e' ) ?>:</p>
|
|
<p class="cabinet-card__text <?php if (!$phone): ?>cabinet-card__text--grey<?php endif; ?>">
|
|
<?php if ($phone):
|
|
echo $phone;
|
|
else:
|
|
?>
|
|
<?php echo esc_html__( 'Not filled', '_pll_e' ) ?>
|
|
<?php endif ?>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="cabinet-card__element">
|
|
<p class="cabinet-card__label"> <?php echo esc_html__( 'Email', '_pll_e' ) ?>:</p>
|
|
<?php if($current_user->user_email): ?>
|
|
<p class="cabinet-card__text"><?php echo $current_user->user_email ?></p>
|
|
<?php
|
|
if (get_field('activated', 'user_' . get_current_user_id())):
|
|
?>
|
|
<p class="cabinet-card__status cabinet-card__status--chek"> <?php echo esc_html__( 'Email is verified', '_pll_e' ) ?></p>
|
|
<?php
|
|
else:
|
|
?>
|
|
<p class="cabinet-card__status cabinet-card__status--cancelled"> <?php echo esc_html__( 'Email is not verified', '_pll_e' ) ?></p>
|
|
<form class="email_approve_form">
|
|
<input type="hidden" name="action" value="email_activate">
|
|
<button type="submit" class="cabinet-card__confirm">
|
|
<?php echo esc_html__( 'Verify', '_pll_e' ) ?>
|
|
</button>
|
|
</form>
|
|
<?php
|
|
if (get_field('uuid', 'user_' . get_current_user_id())):
|
|
?>
|
|
<p class="cabinet-card__status"> <?php echo esc_html__( 'Email width verification link is sent to your email.', '_pll_e' ) ?></p>
|
|
<?php
|
|
endif;
|
|
?>
|
|
<?php
|
|
endif;
|
|
?>
|
|
<?php 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"><?php echo pll__('Link email', '_pll_e'); ?></button>
|
|
</form>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<?php
|
|
$tg_account = get_user_meta( $current_user->ID, ' Traveling', true );
|
|
?>
|
|
<div class="cabinet-card__element">
|
|
<p class="cabinet-card__label"> <?php echo pll__( 'Linked accounts') ?>:</p>
|
|
<p class="cabinet-card__text cabinet-accounts">
|
|
<?php 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>
|
|
<?php 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>
|
|
<?php endif ?>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="cabinet-card__element">
|
|
<div class="cabinet-card__block-buttons">
|
|
<button class="cabinet-card__button user-edit-open">
|
|
<?php echo esc_html__( 'Edit', '_pll_e' ) ?>
|
|
</button>
|
|
|
|
<a href="<?php echo wp_logout_url(home_url()) ?>" class="cabinet-card__button">
|
|
<?php echo esc_html__( 'Logout', '_pll_e' ) ?>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php
|
|
// Получаем текущего пользователя
|
|
$current_user_id = get_current_user_id();
|
|
|
|
// Проверяем, что пользователь авторизован
|
|
if ($current_user_id) {
|
|
// Параметры для WP_Query
|
|
$args = array(
|
|
'post_type' => 'pets', // Тип постов
|
|
'meta_query' => array(
|
|
array(
|
|
'key' => 'user', // Имя метаполя
|
|
'value' => $current_user_id, // Значение метаполя (ID текущего пользователя)
|
|
'compare' => '=' // Условие сравнения
|
|
)
|
|
)
|
|
);
|
|
|
|
// Создаем новый объект WP_Query
|
|
$query = new \WP_Query($args);
|
|
|
|
if ($query->have_posts()) {
|
|
// Начинаем цикл по постам
|
|
while ($query->have_posts()) {
|
|
$query->the_post();
|
|
get_pet_card($post);
|
|
}
|
|
// Сбрасываем данные постов
|
|
wp_reset_postdata();
|
|
}
|
|
}
|
|
?>
|
|
|
|
<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="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/plus-grey.svg" alt="">
|
|
</div>
|
|
|
|
<p class="cabinet-card-add-pets__text">
|
|
<?php echo esc_html__( 'Add a pet', '_pll_e' ) ?>
|
|
</p>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="cabinet__orders cabinet-content active hide">
|
|
<div class="cabinet-card cabinet-card--green-white cabinet__subscription-pc">
|
|
<div class="cabinet-card__content">
|
|
<p class="cabinet-card__title">
|
|
<?php echo esc_html__( 'Feed subscription', '_pll_e' ) ?>
|
|
</p>
|
|
<div class="cabinet-card__element">
|
|
<p class="cabinet-card__text"> <?php echo esc_html__( 'Weekly food delivery for your pet', '_pll_e' ) ?></p>
|
|
</div>
|
|
|
|
<div class="cabinet-card__element">
|
|
<button class="button button--gradient button--high-46 form-sub__btn">
|
|
<?php echo esc_html__( 'Get details', '_pll_e' ) ?>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php
|
|
$customer_orders = wc_get_orders( array(
|
|
'customer_id' => $current_user->ID,
|
|
) );
|
|
|
|
if ($customer_orders):
|
|
foreach($customer_orders as $order):
|
|
$meta_data = get_post_meta($order->get_id(), 'order_data', true);
|
|
$shipping_address = $order->get_address( 'shipping' );
|
|
?>
|
|
<div class="cabinet-card cabinet-card--grey">
|
|
<div class="cabinet-card__content">
|
|
<div class="cabinet-card__order">
|
|
<div class="cabinet-card-order__header">
|
|
<div class="cabinet-card-order__main">
|
|
<p class="cabinet-card-order-main__date"><?php echo esc_html__( 'Order from', '_pll_e' ) ?> <?php echo $order->get_date_created()->date('Y.m.d') ?></p>
|
|
<p class="cabinet-card-order-main__number"><?php echo $order->get_id() ?></p>
|
|
</div>
|
|
<div class="cabinet-card-order__payment">
|
|
<p class="cabinet-card-order-payment__title"><?php echo esc_html__( 'Summary', '_pll_e' ) ?>:</p>
|
|
<p class="cabinet-card-order-payment__price"><?php echo $order->get_total() ?></p>
|
|
</div>
|
|
</div>
|
|
<div class="cabinet-card-order__bottom">
|
|
<div class="cabinet-card-order__content">
|
|
<?php
|
|
if ($meta_data){
|
|
$order_track = $meta_data['order_number'];
|
|
}
|
|
else{
|
|
$order_track = '';
|
|
}
|
|
?>
|
|
<div class="cabinet-card-order__block-detail">
|
|
<div class="cabinet-card-order__detail">
|
|
<div class="cabinet-card-order-detail__address">
|
|
<p class="cabinet-card-order-detail-address__title"><?php echo esc_html__( 'Delivery address', '_pll_e' ) ?> </p>
|
|
<p class="cabinet-card-order-detail-address__text">
|
|
<?php
|
|
if (isset($meta_data['office_code'])):
|
|
echo esc_html__( 'CDEK shipping point', '_pll_e' );
|
|
echo '<br>';
|
|
echo json_decode($api->getOffices(['code' => $meta_data['office_code']])['body'])[0]->name;
|
|
?>
|
|
<?php
|
|
else:
|
|
echo $shipping_address['city'] . ' ' . $shipping_address['address_1'];
|
|
?>
|
|
<?php
|
|
endif;
|
|
?>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="cabinet-card-order-detail__main">
|
|
<div class="cabinet-card-order-detail-main__products">
|
|
<?php
|
|
foreach ($order->get_items() as $item_id => $item) :
|
|
$product_name = $item->get_name();
|
|
$product_quantity = $item->get_quantity();
|
|
$product_total = $item->get_total();
|
|
$product = $item->get_product();
|
|
|
|
if ($product){
|
|
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $product->get_id() ), 'thumbnail' );
|
|
}
|
|
else{
|
|
$thumbnail = '';
|
|
}
|
|
?>
|
|
<div class="cabinet-card-order-detail-main__product">
|
|
<img src="<?php echo $thumbnail[0]; ?>" alt="" class="cabinet-card-order-detail-main-product__img">
|
|
|
|
<div class="cabinet-card-order-detail-main-product__content">
|
|
<div class="cabinet-card-order-detail-main-product__description">
|
|
<p class="cabinet-card-order-detail-main-product-description__what"><?php echo $product_name ?></p>
|
|
<!-- <p class="cabinet-card-order-detail-main-product-description__with-what">Индейка, 2 <?php echo esc_html__('kg', '_pll_e' ); ?></p> -->
|
|
</div>
|
|
|
|
<p class="cabinet-card-order-detail-main-product__count"><?php echo $product_quantity ?></p>
|
|
|
|
<p class="cabinet-card-order-detail-main-product__price"><?php echo $product_total ?></p>
|
|
</div>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
|
|
<div class="cabinet-card-order-detail-main__links">
|
|
<?php
|
|
if($order_track):
|
|
?>
|
|
<a href="https://www.cdek.ru/ru/tracking/?order_id=<?php echo $order_track ?>" target="_blank" class="cabinet-card__button cabinet-card-order-detail-main__link">
|
|
<?php echo esc_html__( 'Track order', '_pll_e' ) ?>
|
|
</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<button class="cabinet-card-order__open-detail"><?php echo esc_html__( 'Order details', '_pll_e' ) ?></button>
|
|
</div>
|
|
|
|
<div class="cabinet-card-order__detail-short">
|
|
<?php
|
|
foreach ($order->get_items() as $item_id => $item) :
|
|
$product = $item->get_product();
|
|
if ($product){
|
|
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $product->get_id() ), 'thumbnail' );
|
|
}
|
|
else{
|
|
$thumbnail = '';
|
|
}
|
|
?>
|
|
<?php if ($thumbnail[0]): ?>
|
|
<a href="<?php echo get_the_permalink($product->get_id()) ?>"><img src="<?= $thumbnail[0] ?>" alt="" class="cabinet-card-order-detail-short__item"></a>
|
|
<?php endif; ?>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
endforeach;
|
|
else:
|
|
?>
|
|
<div class="cabinet-card__no-orders">
|
|
<div class="cabinet-card-no-orders__element">
|
|
<p class="cabinet-card-no-orders__title"><?php echo esc_html__( 'No orders yet', '_pll_e' ) ?></p>
|
|
</div>
|
|
<div class="cabinet-card-no-orders__element">
|
|
<a href="/shop/" class="to-know button--100-perc to-know--background-none">
|
|
<p><?php echo esc_html__( 'Catalog', '_pll_e' ) ?></p>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
endif;
|
|
?>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<?php
|
|
$args = array(
|
|
'post_type' => 'pets', // Тип постов
|
|
'meta_query' => array(
|
|
array(
|
|
'key' => 'user', // Имя метаполя
|
|
'value' => $current_user_id, // Значение метаполя (ID текущего пользователя)
|
|
'compare' => '=' // Условие сравнения
|
|
)
|
|
)
|
|
);
|
|
|
|
// Создаем новый объект WP_Query
|
|
$query = new \WP_Query($args);
|
|
|
|
if ($query->have_posts()) {
|
|
// Начинаем цикл по постам
|
|
while ($query->have_posts()) {
|
|
$query->the_post();
|
|
|
|
switch (get_field('weight')){
|
|
case ('below_1_5'):
|
|
$w = esc_html__('from 0,5 kg to 1,5 kg', '_pll_e' );
|
|
break;
|
|
case ('1_5-3'):
|
|
$w = esc_html__('from 1.5 to 3 kg', '_pll_e' );
|
|
break;
|
|
case ('3-5'):
|
|
$w = esc_html__('from 3 to 5 kg', '_pll_e' );
|
|
break;
|
|
case ('5-8'):
|
|
$w = esc_html__('from 5 to 8 kg', '_pll_e' );
|
|
break;
|
|
case ('8-11'):
|
|
$w = esc_html__('from 8 to 11 kg', '_pll_e' );
|
|
break;
|
|
case ('11-15'):
|
|
$w = esc_html__('from 11 to 15 kg', '_pll_e' );
|
|
break;
|
|
case ('15-20'):
|
|
$w = esc_html__('from 15 to 20 kg', '_pll_e' );
|
|
break;
|
|
case ('20-25'):
|
|
$w = esc_html__('from 20 to 25 kg', '_pll_e' );
|
|
break;
|
|
case ('25-35'):
|
|
$w = esc_html__('from 25 to 35 kg', '_pll_e' );
|
|
break;
|
|
case ('more_35'):
|
|
$w = esc_html__('More than 35 kg', '_pll_e' );
|
|
break;
|
|
}
|
|
switch (get_field('old')){
|
|
case ('normal'):
|
|
$old = __('Adult (from 1 year to 7 years)', '_pll_e' );
|
|
break;
|
|
case ('old'):
|
|
$old = __('Elderly (from 7 to 12 years)', '_pll_e' );
|
|
break;
|
|
case ('very_old'):
|
|
$old = __('Aging (12 years and older)', '_pll_e' );
|
|
break;
|
|
case ('baby'):
|
|
$old = __('Baby (from 0 to 1 year)', '_pll_e' );
|
|
break;
|
|
}
|
|
switch (get_field('activity')){
|
|
case ('low'):
|
|
$act = esc_html__('Low', '_pll_e' );
|
|
break;
|
|
case ('moderate'):
|
|
$act = esc_html__('Moderate', '_pll_e' );
|
|
break;
|
|
case ('high'):
|
|
$act = esc_html__('High', '_pll_e' );
|
|
break;
|
|
}
|
|
?>
|
|
<?php
|
|
$months = array(
|
|
esc_html__('january', '_pll_e' ),
|
|
esc_html__('february', '_pll_e' ),
|
|
esc_html__('march', '_pll_e' ),
|
|
esc_html__('april', '_pll_e' ),
|
|
esc_html__('may', '_pll_e' ),
|
|
esc_html__('june', '_pll_e' ),
|
|
esc_html__('july', '_pll_e' ),
|
|
esc_html__('august', '_pll_e' ),
|
|
esc_html__('september', '_pll_e' ),
|
|
esc_html__('october', '_pll_e' ),
|
|
esc_html__('november', '_pll_e' ),
|
|
esc_html__('december', '_pll_e' ),
|
|
);
|
|
?>
|
|
|
|
<div class="modalProfile" id="pet_edit_<?php echo get_the_ID($post); ?>">
|
|
<div class="popup-wrap">
|
|
<div class="modal-form form__full-mobile modal-form--white modal-form--height-100-phone form-pet active">
|
|
<button class="modal-form__close"></button>
|
|
<p class="modal-form__title"><?php echo esc_html__('Edit pet', '_pll_e' ); ?> <?php echo get_the_title() ?></p>
|
|
|
|
<form class="modal-form__content edit-pet-form" method="post" action="">
|
|
<input type="hidden" name="action" value="edit_pet">
|
|
<div class="modal-form-content__line">
|
|
<label class="label-name"><?php echo esc_html__('Pet type', '_pll_e' ); ?></label>
|
|
<div class="form-input__tabs">
|
|
<label class="form-input-tabs__button <?php if (get_field('type', $post) == 'cat'): ?> active <?php endif; ?>">
|
|
<?php echo esc_html__('Dog', '_pll_e' ); ?>
|
|
<input type="radio" value="cat" <?php if (get_field('type', $post) == 'cat'): ?> checked <?php endif; ?> name="pet" class="form-input-tabs__input">
|
|
</label>
|
|
|
|
<label class="form-input-tabs__button <?php if (get_field('type', $post) == 'dog'): ?> active <?php endif; ?>">
|
|
<?php echo esc_html__('Cat', '_pll_e' ); ?>
|
|
<input type="radio" value="dog" <?php if (get_field('type', $post) == 'dog'): ?> checked <?php endif; ?> name="pet" class="form-input-tabs__input">
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-form-content__line sterilized" <?php if (get_field('type', $post) == 'dog'): ?> style="display: none;" <?php endif; ?>>
|
|
<label for="" class="label-name"><?php echo esc_html__('Sterilized', '_pll_e' ); ?></label>
|
|
|
|
<div class="form-input__tabs">
|
|
<label class="form-input-tabs__button <?php if (get_field('sterilized', $post)): ?> active<?php endif; ?>">
|
|
<?php echo esc_html__('Yes', '_pll_e' ); ?>
|
|
<input type="radio" value="1" <?php if (get_field('sterilized', $post)): ?> checked <?php endif; ?> name="sterilized" class="form-input-tabs__input">
|
|
</label>
|
|
|
|
<label class="form-input-tabs__button <?php if (!get_field('sterilized', $post)): ?> active<?php endif; ?>">
|
|
<?php echo esc_html__('No', '_pll_e' ); ?>
|
|
<input type="radio" value="0" <?php if (!get_field('sterilized', $post)): ?> checked <?php endif; ?> name="sterilized" class="form-input-tabs__input">
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-form-content__line">
|
|
<div class="modal-form-content-line__element">
|
|
<label for="firstname" class="label-name"><?php echo esc_html__('Breed', '_pll_e' ); ?></label>
|
|
<input id="firstname" class="form__input" type="text" value="<?php echo get_field('breed', $post) ?>" name="breed"
|
|
placeholder="Порода вашего питомца" required="">
|
|
<!-- <span class="form-input__error form-input__error--absolute">Порода введено неверно</span> -->
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-form-content__line">
|
|
<label for="" class="label-name"><?php echo esc_html__('Gender of your pet', '_pll_e' ); ?></label>
|
|
|
|
<div class="form-input__tabs">
|
|
<label class="form-input-tabs__button <?php if (get_field('sex', $post) == 'male'): ?> active<?php endif; ?>">
|
|
<?php echo esc_html__('Boy', '_pll_e' ); ?>
|
|
<input type="radio" value="male" <?php if (get_field('sex', $post) == 'male'): ?> checked<?php endif; ?> name="sex" class="form-input-tabs__input">
|
|
</label>
|
|
|
|
<label class="form-input-tabs__button <?php if (get_field('sex', $post) != 'male'): ?> active<?php endif; ?>">
|
|
<?php echo esc_html__('Girl', '_pll_e' ); ?>
|
|
<input type="radio" value="female" <?php if (get_field('sex', $post) != 'male'): ?> checked<?php endif; ?> name="sex" class="form-input-tabs__input">
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-form-content__line modal-form-content__line--two">
|
|
<div class="modal-form-content-line__element">
|
|
<label class="label-name"><?php echo esc_html__('Type of activity', '_pll_e' ); ?></label>
|
|
<div class="form-input__list">
|
|
<div class="form-input-list__input"><?php echo $act ?></div>
|
|
<div class="form-input-list__block-content" style="height: 0px;">
|
|
<div class="form-input-list__content">
|
|
<label class="form-input-list__item <?php if (get_field('activity', $post) == 'low'): ?> active<?php endif; ?>">
|
|
<p class="form-input-list-item__text"><?php echo esc_html__('Low', '_pll_e' ); ?></p>
|
|
<input type="radio" required name="activity" <?php if (get_field('activity', $post) == 'low'): ?> checked<?php endif; ?> value="low" class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item <?php if (get_field('activity', $post) == 'moderate'): ?> active<?php endif; ?>">
|
|
<p class="form-input-list-item__text"><?php echo esc_html__('Moderate', '_pll_e' ); ?></p>
|
|
<input type="radio" required name="activity" <?php if (get_field('activity', $post) == 'moderate'): ?> checked<?php endif; ?> value="moderate" class="v-hidden"
|
|
id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item <?php if (get_field('activity', $post) == 'high'): ?> active<?php endif; ?>">
|
|
<p class="form-input-list-item__text"><?php echo esc_html__('High', '_pll_e' ); ?></p>
|
|
<input type="radio" required name="activity" value="high" <?php if (get_field('activity', $post) == 'high'): ?> checked<?php endif; ?> class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-form-content-line__element">
|
|
<label for="firstname" class="label-name"><?php echo esc_html__('Weight', '_pll_e' ); ?></label>
|
|
<div class="form-input__list">
|
|
<div class="form-input-list__input"><?php echo $w ?></div>
|
|
<div class="form-input-list__block-content" style="height: 0px;">
|
|
<div class="form-input-list__content">
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text">1-1.5 <?php echo esc_html__('kg', '_pll_e' ); ?></p>
|
|
<input type="radio" required name="weight" <?php if (get_field('weight', $post) == 'below_1_5'): ?> checked<?php endif; ?> value="below_1_5" class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text">1.5-3 <?php echo esc_html__('kg', '_pll_e' ); ?></p>
|
|
<input type="radio" required name="weight" <?php if (get_field('weight', $post) == '1_5-3'): ?> checked<?php endif; ?> value="1_5-3" class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text">3-5 <?php echo esc_html__('kg', '_pll_e' ); ?></p>
|
|
<input type="radio" required name="weight" <?php if (get_field('weight', $post) == '3-5'): ?> checked<?php endif; ?> value="3-5" class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text">5-8 <?php echo esc_html__('kg', '_pll_e' ); ?></p>
|
|
<input type="radio" required name="weight" <?php if (get_field('weight', $post) == '5-8'): ?> checked<?php endif; ?> value="5-8" class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text">8-11 <?php echo esc_html__('kg', '_pll_e' ); ?></p>
|
|
<input type="radio" required name="weight" <?php if (get_field('weight', $post) == '8-11'): ?> checked<?php endif; ?> value="8-11" class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text">11-15 <?php echo esc_html__('kg', '_pll_e' ); ?></p>
|
|
<input type="radio" required name="weight" <?php if (get_field('weight', $post) == '11-15'): ?> checked<?php endif; ?> value="11-15" class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text">15-20 <?php echo esc_html__('kg', '_pll_e' ); ?></p>
|
|
<input type="radio" required name="weight" <?php if (get_field('weight', $post) == '15-20'): ?> checked<?php endif; ?> value="15-20" class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text">20-25 <?php echo esc_html__('kg', '_pll_e' ); ?></p>
|
|
<input type="radio" required name="weight" <?php if (get_field('weight', $post) == '20-25'): ?> checked<?php endif; ?> value="20-25" class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text">25-35 <?php echo esc_html__('kg', '_pll_e' ); ?></p>
|
|
<input type="radio" required name="weight" <?php if (get_field('weight', $post) == '25-35'): ?> checked<?php endif; ?> value="25-35" class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text"><?php echo esc_html__('More than', '_pll_e' ); ?> 35 <?php echo esc_html__('kg', '_pll_e' ); ?></p>
|
|
<input type="radio" required name="weight" <?php if (get_field('weight', $post) == 'more_35'): ?> checked<?php endif; ?> value="more_35" class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="rm">
|
|
<div class="modal-form-content__line">
|
|
<label for="" class="label-name"><?php echo esc_html__("Pet's age", '_pll_e' ); ?></label>
|
|
<div class="form-input__tabs form-input__remote-control" data-content="modal__age">
|
|
<label class="form-input-tabs__button active" data-rm="0">
|
|
<?php echo esc_html__('Exemplary', '_pll_e' ); ?>
|
|
<input type="radio" checked value="ex" name="old_type" required
|
|
class="form-input-tabs__input">
|
|
</label>
|
|
|
|
<label class="form-input-tabs__button" data-rm="1">
|
|
<?php echo esc_html__('Exact', '_pll_e' ); ?>
|
|
<input type="radio" value="acc" name="old_type" required
|
|
class="form-input-tabs__input">
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal__age">
|
|
<div class="form-input__radio remote-control__item active" data-rmcont="0">
|
|
<label class="form-input-radio__item <?php if (get_field('old', $post) == 'baby'): ?> active<?php endif; ?>" >
|
|
<input type="radio" name="old" value="baby" <?php if (get_field('old', $post) == 'baby'): ?> checked<?php endif; ?> class="v-hidden">
|
|
<div class="form-input-radio__circle">
|
|
<div class="form-input-radio-circle__content"></div>
|
|
</div>
|
|
|
|
<p class="form-input-radio__title"> <?php echo __('Baby <span>(from 0 to 1 year)</span>', '_pll_e' ); ?></p>
|
|
</label>
|
|
<label class="form-input-radio__item <?php if (get_field('old', $post) == 'normal'): ?> active<?php endif; ?>">
|
|
<input type="radio" name="old" value="normal" <?php if (get_field('old', $post) == 'normal'): ?> checked<?php endif; ?> class="v-hidden">
|
|
<div class="form-input-radio__circle">
|
|
<div class="form-input-radio-circle__content"></div>
|
|
</div>
|
|
|
|
<p class="form-input-radio__title"> <?php echo __('Adult <span>(from 1 year to 7 years)</span>', '_pll_e' ); ?></p>
|
|
</label>
|
|
<label class="form-input-radio__item <?php if (get_field('old', $post) == 'old'): ?> active<?php endif; ?>">
|
|
<input type="radio" name="old" value="old" <?php if (get_field('old', $post) == 'old'): ?> checked<?php endif; ?> class="v-hidden">
|
|
<div class="form-input-radio__circle">
|
|
<div class="form-input-radio-circle__content"></div>
|
|
</div>
|
|
|
|
<p class="form-input-radio__title"> <?php echo __('Elderly <span>(from 7 to 12 years)</span>', '_pll_e' ); ?></p>
|
|
</label>
|
|
<label class="form-input-radio__item <?php if (get_field('old', $post) == 'very_old'): ?> active<?php endif; ?>">
|
|
<input type="radio" name="old" <?php if (get_field('old', $post) == 'very_old'): ?> checked<?php endif; ?> value="very_old" class="v-hidden">
|
|
<div class="form-input-radio__circle">
|
|
<div class="form-input-radio-circle__content"></div>
|
|
</div>
|
|
|
|
<p class="form-input-radio__title"> <?php echo __('Aging <span>(12 years and older)</span>', '_pll_e' ); ?></p>
|
|
</label>
|
|
</div>
|
|
<div data-rmcont="1"
|
|
class="modal-form-content__line remote-control__item modal-form-content__line--three modal-form-content__line--margin-top-16 ">
|
|
<div class="modal-form-content-line__element">
|
|
<label for="firstname" class="label-name"><?php echo esc_html__('Day', '_pll_e' ); ?></label>
|
|
<input id="firstname" class="form__input form__input--center" maxlength="2" type="text"
|
|
name="day" placeholder="<?php echo esc_html__('DD', '_pll_e' ); ?>" value="<?php echo get_field('day', $post) ?>">
|
|
</div>
|
|
|
|
<div class="modal-form-content-line__element">
|
|
<label for="firstname" class="label-name"><?php echo esc_html__('Month', '_pll_e' ); ?></label>
|
|
<div class="form-input__list">
|
|
<?php
|
|
if(get_field('month', $post)):
|
|
?>
|
|
<div class="form-input-list__input"><?php echo $months[intval(get_field('month', $post)) - 1 ]; ?></div>
|
|
<?php
|
|
else:
|
|
?>
|
|
<div class="form-input-list__input"><?php echo esc_html__('Month', '_pll_e' ); ?></div>
|
|
<?php
|
|
endif;
|
|
?>
|
|
<div class="form-input-list__block-content">
|
|
<div class="form-input-list__content">
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text"><?php echo esc_html__('January', '_pll_e' ); ?></p>
|
|
<input type="radio" name="month" value="1" <?php if (get_field('month', $post) == '1'): ?> checked<?php endif; ?> class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text"><?php echo esc_html__('February', '_pll_e' ); ?></p>
|
|
<input type="radio" name="month" value="2" <?php if (get_field('month', $post) == '2'): ?> checked<?php endif; ?> class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text"><?php echo esc_html__('March', '_pll_e' ); ?></p>
|
|
<input type="radio" name="month" value="3" <?php if (get_field('month', $post) == '3'): ?> checked<?php endif; ?> class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text"><?php echo esc_html__('April', '_pll_e' ); ?></p>
|
|
<input type="radio" name="month" value="4" <?php if (get_field('month', $post) == '4'): ?> checked<?php endif; ?> class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text"><?php echo esc_html__('May', '_pll_e' ); ?></p>
|
|
<input type="radio" name="month" value="5" <?php if (get_field('month', $post) == '5'): ?> checked<?php endif; ?> class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text"><?php echo esc_html__('June', '_pll_e' ); ?></p>
|
|
<input type="radio" name="month" value="6" <?php if (get_field('month', $post) == '6'): ?> checked<?php endif; ?> class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text"><?php echo esc_html__('July', '_pll_e' ); ?></p>
|
|
<input type="radio" name="month" value="7" <?php if (get_field('month', $post) == '7'): ?> checked<?php endif; ?> class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text"><?php echo esc_html__('August', '_pll_e' ); ?></p>
|
|
<input type="radio" name="month" value="8" <?php if (get_field('month', $post) == '8'): ?> checked<?php endif; ?> class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text"><?php echo esc_html__('September', '_pll_e' ); ?></p>
|
|
<input type="radio" name="month" value="9" <?php if (get_field('month', $post) == '9'): ?> checked<?php endif; ?> class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg"
|
|
alt="">
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="form-input-list__item">
|
|
<p class="form-input-list-item__text"><?php echo esc_html__('October', '_pll_e' ); ?></p>
|
|
<input type="radio" name="month" value="10" <?php if (get_field('month', $post) == '10'): ?> checked<?php endif; ?> class="v-hidden" id="">
|
|
<div class="form-input-list-item__box">
|
|
<div class="form-input-list-item-box__content">
|
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/svg/main/arrow Progressive Web App (PWA) support
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %} |