armanty-quests/parts/form/form-content.php
2020-11-28 14:21:17 +03:00

255 lines
11 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="form-block container">
<h1>Бронирование праздника</h1>
<div class="row all-form">
<div class="col-lg-8 col-12">
<form class="main-form" method="POST" action="<?php echo admin_url('admin-ajax.php?action=send_main_form')?>">
<h5>Укажите контактные данные</h5>
<div class="form-row">
<div class="form-group col-md-6">
<input required type="text" class="form-control" id="guest-name" placeholder="Как Вас зовут? (ФИО)">
</div>
<div class="form-group col-md-6">
<input type="tel" class="form-control" id="guest-phone" placeholder="Ваш номер телефона">
</div>
</div>
<h5>Информация о вашем празднике</h5>
<div class="form-row">
<div class="form-group col-md-6">
<select class="form-control" id="guest-holiday">
<option>День Рождения</option>
<option>Выпускной</option>
</select>
</div>
<div class="form-group col-md-6">
<input type="text" class="form-control" id="guest-birthday-name" placeholder="Как зовут виновника торжества?">
</div>
<div class="form-group col-md-6">
<input type="text" class="form-control form-date" id="datapicker" placeholder="Дата Рождения ребенка">
</div>
</div>
<h5> Выберите квест и комнату</h5>
<div class="form-row questandroom">
<div class="form-group guest-quest col-12 col-md-6">
<select class="form-control" id="guest-quest">
<option data-maxplayer="0" data-quest="none">Выберите квест</option>
<?php
$posts = get_posts( array(
'category' => 0,
'orderby' => 'date',
'order' => 'ASC',
'include' => array(),
'exclude' => array(),
'meta_key' => '',
'meta_value' =>'',
'post_type' => 'armanty_quests',
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
) );
foreach( $posts as $post ){
setup_postdata($post);
$post_id_7 = get_post( $post, ARRAY_A);
$title = $post_id_7['post_title'];?>
<option data-maxplayer="<?php echo the_field('quest_players_max')?>" data-quest="<?php echo $post->post_name ?>" data-img="<?php the_post_thumbnail_url() ?>"><?php the_title();?></option>
<?php
}
?>
</select>
</div>
<div class="form-group guest-room col-12 col-md-6">
<select class="form-control" id="guest-room">
<option value="default" data-quest="none">Выберите комнату</option>
<?php
$query = new WP_Query(array(
'post_type' => 'armanty_rooms', /// тут ваш тип записи
// 'posts_per_page' => 1, // тут указываем сколько постов вывести из relation.
// 'post__in' => $ids,
'post_status' => 'publish', // тут лучше сменить на 'publish' - показать только опубликованные посты
'orderby' => 'ASC', // Тут указываем сортировку. Если убрать эту строку - отсортируются по дате.
));
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();
$id = get_field('armanty_room_type')[0];
$post_id = get_post($id);
$quest_name = $post_id->post_name;
?>
<option data-quest="<?php echo $quest_name ?>" data-descr="<?php the_content() ?>" data-img="<?php the_post_thumbnail_url() ?>"><?php the_title();?></option>
<?php
}
}
wp_reset_postdata();
?>
</select>
</div>
<div class="row guest-img">
<div class="col-12 col-md-6">
<img src="" style="height: 250px"alt="">
<br>
<span class="guest-quest-name">Квест - название</span>
</div>
<br>
<div class="col-12 col-md-6">
<img src="" style="height: 250px"alt="">
<br>
<span class="guest-room-name">Комната название</span>
<div class="guest-room-descr">Описание комнаты</div>
</div>
</div>
</div>
<div class="form-row">
<div class="col-md-6">
<h5>Укажите количество детей</h5>
<div class="input-group">
<span class="input-group-btn">
<button type="button" class="btn btn-default btn-number" disabled="disabled" data-type="minus"
data-field="quant[1]">
<span class="glyphicon glyphicon-minus"></span>
</button>
</span>
<input type="text" name="quant[1]" id="guest-count" class="form-control input-number" value="1" min="1" max="99">
<span class="input-group-btn">
<button type="button" class="btn btn-default btn-number" data-type="plus" data-field="quant[1]">
<span class="glyphicon glyphicon-plus"></span>
</button>
</span>
</div>
</div>
<div class="form-group col-md-6">
<h5>Выберите дату и время праздника</h5>
<input type="text" class="form-control form-date" id="datapicker2" placeholder="Дата праздника">
</div>
</div>
<h5>Дополнительные услуги</h5>
<div class="form-row">
<div class="form-group col-md-6">
<div class="form-add__item">
<i class="fa fa-eercast" aria-hidden="true"></i>
<div class="form-add__item-text">
<h6>Химическое шоу</h6>
<span>5000 р.</span>
</div>
<div class="btn-group-toggle" data-toggle="buttons">
<label class="btn btn-danger">
<input type="checkbox"> Добавить
</label>
</div>
</div>
</div>
<div class="form-group col-md-6">
<div class="form-add__item">
<i class="fa fa-map" aria-hidden="true"></i>
<div class="form-add__item-text">
<h6>Бумажное шоу</h6>
<span>5000 р.</span>
</div>
<div class="btn-group-toggle" data-toggle="buttons">
<label class="btn btn-danger">
<input type="checkbox"> Добавить
</label>
</div>
</div>
</div>
<div class="form-group col-md-6">
<div class="form-add__item">
<i class="fa fa-star" aria-hidden="true"></i>
<div class="form-add__item-text">
<h6>Шоу мыльных пузерей</h6>
<span>5000 р.</span>
</div>
<div class="btn-group-toggle" data-toggle="buttons">
<label class="btn btn-danger">
<input type="checkbox"> Добавить
</label>
</div>
</div>
</div>
<div class="form-group col-md-6">
<div class="form-add__item">
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
<div class="form-add__item-text">
<h6>Аниматор</h6>
<span>3000 р.</span>
</div>
<div class="btn-group-toggle" data-toggle="buttons">
<label class="btn btn-danger">
<input type="checkbox"> Добавить
</label>
</div>
</div>
</div>
<div class="form-group col-md-6">
<div class="form-add__item">
<i class="fa fa-camera" aria-hidden="true"></i>
<div class="form-add__item-text">
<h6>Фотограф</h6>
<span>2000 р.</span>
</div>
<div class="btn-group-toggle" data-toggle="buttons">
<label class="btn btn-danger">
<input type="checkbox"> Добавить
</label>
</div>
</div>
</div>
<div class="form-group col-md-6">
<div class="form-add__item">
<i class="fa fa-tint mr10" aria-hidden="true"></i>
<div class="form-add__item-text">
<h6>Неоновое шоу</h6>
<span>5000 р.</span>
</div>
<div class="btn-group-toggle" data-toggle="buttons">
<label class="btn btn-danger">
<input type="checkbox"> Добавить
</label>
</div>
</div>
</div>
</div>
<button type="submit" class="btn btn-danger main-form-submit">Заказать праздник</button>
</form>
</div>
<div class="col-lg-4 col-12">
<div class="cheque ">
<div class="cheque-label dots">
<h3>
Справка
</h3>
</div>
<div class="cheque-quest dots">
<h4>Квест</h4>
<p>Егерь - <span>2500</span> р.</p>
</div>
<div class="cheque-date dots">
<h4>Дата и время</h4>
<p>10-го апреля 2020 </p>
</div>
<div class="cheque-guests dots">
<h4>Количество гостей</h4>
<p>
Детей: <span>12</span>
</p>
</div>
<div class="cheque-adding dots">
<h4>Дополнительные услуги</h4>
<p>Химическое шоу - <span>3000</span> р.</p>
</div>
<div class="cheque-sum dots" style="padding:5px 10px">
<h3>ИТОГО <span class="price">8280 р.</span></h3>
</div>
<div class="cheque-info dots" style="padding:5px 10px">
<h4>Организуем незабываемый праздник вместе !</h4>
</div>
</div>
</div>
</div>
</div>