Advertisement
Guest User

Untitled

a guest
Dec 10th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.39 KB | None | 0 0
  1. <?php
  2.  
  3. $forts = [
  4. 'nomans' => [
  5. 'id' => 'NOMANS',
  6. 'name' => 'No Man\'s Fort'
  7. ],
  8. 'spitbank' => [
  9. 'id' => 'SPITBANK',
  10. 'name' => 'Spitbank Fort'
  11. ]
  12. ];
  13. ?>
  14.  
  15. <section class="c-booking-bar / js-bookingbar">
  16.  
  17. <div class="c-booking-bar__slab">
  18.  
  19. <div class="row">
  20.  
  21. <div class="columns">
  22.  
  23. <form action="<?php echo get_field('synxis_base_url', 'option') ?>" method="get" class="c-booking-bar__form">
  24.  
  25. <p class="c-booking-bar__wide">
  26. <label for="hotel-selection"><?php _e('Fort','creative'); ?><span class="screen-reader-text"> selection</span></label>
  27. <select name="hotel" id="hotel-selection">
  28. <?php foreach ($forts as $fort_slug => $fort_details):
  29.  
  30. /**
  31. * Auto select the fort based on the main-navigation selection
  32. */
  33. $navigation_selection = cn_recursive_field('navigation_selection');
  34.  
  35. if ( $fort_slug === $navigation_selection ) {
  36. $selected = 'selected';
  37. } else {
  38. $selected = '';
  39. }
  40. ?>
  41. <option value="<?php echo $fort_details['id'] ?>"<?php if( !empty( $selected ) ) { echo 'selected="' . $selected . '"'; } ?>><?php echo $fort_details['name'] ?></option>
  42. <?php endforeach ?>
  43. </select>
  44. </p>
  45.  
  46. <p class="c-booking-bar__wide">
  47. <label for="arrive"><?php _e('Check-in','arrival'); ?></label>
  48. <input type="text" name="arrival" id="arrive" class="js-datepicker" placeholder="<?php echo date('jS F, Y') ?>" value="<?php echo date('jS F, Y') ?>">
  49. </p>
  50.  
  51. <!-- <p class="c-booking-bar__wide / hide-for-medium">
  52. <label for="depart"><?php _e('Check-out','creative'); ?></label>
  53. <input type="text" name="depart" id="depart" class="js-datepicker" placeholder="<?php echo date('jS F, Y', strtotime('+1 day')) ?>">
  54. </p> -->
  55.  
  56. <!-- <p class="c-booking-bar__thin / hide-for-medium">
  57. <label for="rooms"><?php _e('Rooms','creative'); ?></label>
  58. <input type="number" name="rooms" id="rooms" placeholder="1" novalidate autocorrect="off" pattern="\d+" min="1" max="15">
  59. </p> -->
  60.  
  61. <p class="c-booking-bar__thin / hide-for-medium">
  62. <label for="adult"><?php _e('Adults','creative'); ?></label>
  63. <input type="number" name="adults" id="adult" placeholder="1" novalidate autocorrect="off" pattern="\d+" min="1" max="15">
  64. </p>
  65.  
  66. <p class="c-booking-bar__button">
  67. <button id="c-booking-bar-button" class="c-book-button" type="submit"><?php _e('Book a room','creative'); ?></button>
  68. </p>
  69.  
  70. </form>
  71.  
  72. </div>
  73.  
  74. </div>
  75.  
  76. </div>
  77.  
  78. </section>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement