Advertisement
Beee

Search form twig

Apr 9th, 2018
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 4.46 KB | None | 0 0
  1. {% if function( 'is_page_template', 'templates/sexdate-search.php' ) %}
  2.     {% if countries %}
  3.         <div class="search-criteria search-criteria-countries{{ has_sidebar }}">
  4.             <div class="search-criteria-header">
  5.                 {{ __( 'Country', 'sexdates' ) }}
  6.             </div>
  7.             <div class="xscroll-select">
  8.                 {% for country in countries %}
  9.                     <div class="input_option">
  10.                         <label for="{{ country.label }}" class="screen-reader-text">{{ country.label }}</label>
  11.                         <input type="checkbox" name="country[]" id="{{ country.label }}" class="{{ country.value }}" value="{{ country.value }}"/>{{ country.label }}
  12.                     </div>
  13.                 {% endfor %}
  14.             </div>
  15.         </div>
  16.     {% endif %}
  17. {% endif %}
  18.  
  19. <div class="search-criteria search-criteria-states{{ has_sidebar }}">
  20.     <div class="search-criteria-header">
  21.         {{ __( 'State', 'sexdates' ) }}
  22.         <small><span>({{ __( 'scroll for more', 'sexdates' ) }})</span></small>
  23.     </div>
  24.     {% if states_nl or states_be %}
  25.         <div class="scroll-select">
  26.             <div class="input_option select_note{% if function( 'is_page_template', 'templates/sexdate-search.php' ) == false %} hidden{% endif %}">
  27.                 <small>{{ __( 'Select a country', 'sexdates' ) }}</small>
  28.             </div>
  29.             {% if country_code == 'NL' or function( 'is_page_template', 'templates/sexdate-search.php' ) %}
  30.                 {% for state in states_nl %}
  31.                     <div class="input_option{% if post.post_name in ['search','zoeken','suchen'] %} hidden{% endif %} nl">
  32.                         <label for="{{ state.label }}" class="screen-reader-text">{{ state.label }}</label>
  33.                         <input type="checkbox" name="state[]" id="{{ state.label }}" class="{{ state.value }}" value="{{ state.value }}"{% if state.value == state_search_value %} checked="checked"{% endif %}/>{{ state.label }}
  34.                     </div>
  35.                 {% endfor %}
  36.             {% endif %}
  37.             {% if country_code == 'BE' or function( 'is_page_template', 'templates/sexdate-search.php' ) %}
  38.                 {% for state in states_be %}
  39.                     <div class="input_option{% if post.post_name in ['search','zoeken','suchen'] %} hidden{% endif %} be">
  40.                         <label for="{{ state.label }}" class="screen-reader-text">{{ state.label }}</label>
  41.                         <input type="checkbox" name="state[]" id="{{ state.label }}" class="{{ state.value }}" value="{{ state.value }}"{% if state.value == state_search_value %} checked="checked"{% endif %}/>{{ state.label }}
  42.                     </div>
  43.                 {% endfor %}
  44.             {% endif %}
  45.             <div class="input_option hidden lu">
  46.                 {{ __( 'There are no states in Luxembourg', 'sexdates' ) }}
  47.             </div>
  48.         </div>
  49.     {% endif %}
  50. </div>
  51.  
  52. <div class="search-criteria search-criteria-cities{{ has_sidebar }}">
  53.     <div class="search-criteria-header">
  54.         {{ __( 'City', 'sexdates' ) }}
  55.         <small><span>({{ __( 'scroll for more', 'sexdates' ) }})</span></small>
  56.     </div>
  57.     {% if cities_nl or cities_be %}
  58.         <div class="scroll-select">
  59.             <div class="input_option select_note hidden">
  60.                 {#<small>{{ __( 'Select a country', 'sexdates' ) }}</small>#}
  61.             </div>
  62.             {% for city in cities_nl %}
  63.                 <div class="input_option {{ city.state }} hidden">
  64.                     <label for="{{ city.label }}" class="screen-reader-text">{{ city.label }}</label>
  65.                     <input type="checkbox" name="city[]" class="{{ city.state }}" id="{{ city.label }}" value="{{ city.value }}"{% if city.value == city_search_value %} checked="checked"{% endif %}/>{{ city.label }}
  66.                 </div>
  67.             {% endfor %}
  68.             {% if country_code != 'NL'  %}
  69.                 {% for city in cities_be %}
  70.                     <div class="input_option {{ city.state }} hidden">
  71.                         <label for="{{ city.label }}" class="screen-reader-text">{{ city.label }}</label>
  72.                         <input type="checkbox" name="city[]" class="{{ city.state }}" id="{{ city.label }}" value="{{ city.value }}"{% if city.value == city_search_value %} checked="checked"{% endif %}/>{{ city.label }}
  73.                     </div>
  74.                 {% endfor %}
  75.             {% endif %}
  76.         </div>
  77.     {% endif %}
  78. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement