Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $forts = [
- 'nomans' => [
- 'id' => 'NOMANS',
- 'name' => 'No Man\'s Fort'
- ],
- 'spitbank' => [
- 'id' => 'SPITBANK',
- 'name' => 'Spitbank Fort'
- ]
- ];
- ?>
- <section class="c-booking-bar / js-bookingbar">
- <div class="c-booking-bar__slab">
- <div class="row">
- <div class="columns">
- <form action="<?php echo get_field('synxis_base_url', 'option') ?>" method="get" class="c-booking-bar__form">
- <p class="c-booking-bar__wide">
- <label for="hotel-selection"><?php _e('Fort','creative'); ?><span class="screen-reader-text"> selection</span></label>
- <select name="hotel" id="hotel-selection">
- <?php foreach ($forts as $fort_slug => $fort_details):
- /**
- * Auto select the fort based on the main-navigation selection
- */
- $navigation_selection = cn_recursive_field('navigation_selection');
- if ( $fort_slug === $navigation_selection ) {
- $selected = 'selected';
- } else {
- $selected = '';
- }
- ?>
- <option value="<?php echo $fort_details['id'] ?>"<?php if( !empty( $selected ) ) { echo 'selected="' . $selected . '"'; } ?>><?php echo $fort_details['name'] ?></option>
- <?php endforeach ?>
- </select>
- </p>
- <p class="c-booking-bar__wide">
- <label for="arrive"><?php _e('Check-in','arrival'); ?></label>
- <input type="text" name="arrival" id="arrive" class="js-datepicker" placeholder="<?php echo date('jS F, Y') ?>" value="<?php echo date('jS F, Y') ?>">
- </p>
- <!-- <p class="c-booking-bar__wide / hide-for-medium">
- <label for="depart"><?php _e('Check-out','creative'); ?></label>
- <input type="text" name="depart" id="depart" class="js-datepicker" placeholder="<?php echo date('jS F, Y', strtotime('+1 day')) ?>">
- </p> -->
- <!-- <p class="c-booking-bar__thin / hide-for-medium">
- <label for="rooms"><?php _e('Rooms','creative'); ?></label>
- <input type="number" name="rooms" id="rooms" placeholder="1" novalidate autocorrect="off" pattern="\d+" min="1" max="15">
- </p> -->
- <p class="c-booking-bar__thin / hide-for-medium">
- <label for="adult"><?php _e('Adults','creative'); ?></label>
- <input type="number" name="adults" id="adult" placeholder="1" novalidate autocorrect="off" pattern="\d+" min="1" max="15">
- </p>
- <p class="c-booking-bar__button">
- <button id="c-booking-bar-button" class="c-book-button" type="submit"><?php _e('Book a room','creative'); ?></button>
- </p>
- </form>
- </div>
- </div>
- </div>
- </section>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement