Commit 155f77414473e7c42228d709b202f2a79d3393b3

Authored by Luan
1 parent 101e2f87

Changing search datepicker for mobiles

src/search/templates/search/includes/search_filters.html
... ... @@ -138,30 +138,58 @@
138 138 </ul>
139 139 {% endif %}
140 140 <hr />
141   -<form role="form">
  141 +
  142 +<!-- Desktop since and date filters -->
  143 +<form role="form" class="hidden-sm hidden-xs">
142 144 {% for name, value in request.GET.items %}
143 145 {% if value and not name == "since" and not name == "until" %}
144 146 <input type="hidden" name="{{ name }}" value="{{ value }}" />
145 147 {% endif %}
146 148 {% endfor %}
  149 +
147 150 <div class="form-group">
148 151 <label for="since">{% trans "Since" %}</label>
149   - <div class="input-group date" id="datepicker_since">
150   - <input type="text" class="form-control" placeholder="{% trans "Since" %}" name="since" value="{{ request.GET.since }}" />
151   - <span class="input-group-addon">
152   - <span class="glyphicon glyphicon-calendar"></span>
153   - </span>
154   - </div>
  152 + <div class="input-group date" id="datepicker_since">
  153 + <input type="text" class="form-control" placeholder="{% trans "Since" %}" name="since" value="{{ request.GET.since }}" />
  154 + <span class="input-group-addon">
  155 + <span class="glyphicon glyphicon-calendar"></span>
  156 + </span>
  157 + </div>
155 158 </div>
156 159 <div class="form-group">
157 160 <label for="until">{% trans "Until" %}</label>
158   - <div class="input-group date" id="datepicker_until">
159   - <input type="text" class="form-control" placeholder="{% trans "Until" %}" name="until" value="{{ request.GET.until }}" />
160   - <span class="input-group-addon">
161   - <span class="glyphicon glyphicon-calendar"></span>
162   - </span>
163   - </div>
  161 + <div class="input-group date" id="datepicker_until">
  162 + <input type="text" class="form-control" placeholder="{% trans "Until" %}" name="until" value="{{ request.GET.until }}" />
  163 + <span class="input-group-addon">
  164 + <span class="glyphicon glyphicon-calendar"></span>
  165 + </span>
  166 + </div>
  167 + </div>
  168 +
  169 + <p class="text-right">
  170 + <button type="submit" class="btn btn-default">
  171 + <span class="glyphicon glyphicon-filter"></span> {% trans "Filter" %}
  172 + </button>
  173 + </p>
  174 +</form>
  175 +
  176 +<!-- Mobile since and date filters -->
  177 +<form role="form" class="hidden-md hidden-lg">
  178 + {% for name, value in request.GET.items %}
  179 + {% if value and not name == "since" and not name == "until" %}
  180 + <input type="hidden" name="{{ name }}" value="{{ value }}" />
  181 + {% endif %}
  182 + {% endfor %}
  183 +
  184 + <div class="form-group">
  185 + <label for="since">{% trans "Since" %}</label>
  186 + <input type="date" class="form-control" placeholder="{% trans "Since" %}" name="since" value="{{ request.GET.since }}" />
164 187 </div>
  188 + <div class="form-group hidden-md hidden-lg">
  189 + <label for="until">{% trans "Until" %}</label>
  190 + <input type="date" class="form-control" placeholder="{% trans "Until" %}" name="until" value="{{ request.GET.until }}" />
  191 + </div>
  192 +
165 193 <p class="text-right">
166 194 <button type="submit" class="btn btn-default">
167 195 <span class="glyphicon glyphicon-filter"></span> {% trans "Filter" %}
... ...