Commit 00ddd60e50c8443a61371292c515976e322334b6

Authored by Luan
1 parent 675bfbcc

Adding temporary fix to pt-br language with the date range filter

Showing 1 changed file with 7 additions and 3 deletions   Show diff stats
src/templates/search/search.html
... ... @@ -3,11 +3,15 @@
3 3  
4 4 {% block head_js %}
5 5 <script type="text/javascript" src="{{ STATIC_URL }}third-party/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
  6 +{% if LANGUAGE_CODE == "pt-br" %}
  7 + <script type="text/javascript" src="{{ STATIC_URL }}third-party/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.pt-BR.js"></script>
  8 +{% endif %}
6 9  
7 10 <script type="text/javascript">
8 11 $(function () {
9 12 $('#datepicker_since, #datepicker_until').datetimepicker({
10   - pickTime: false
  13 + pickTime: false,
  14 + {% if LANGUAGE_CODE == "pt-br" %}language: 'pt-BR'{% endif %}
11 15 });
12 16 });
13 17 </script>
... ... @@ -120,7 +124,7 @@
120 124 <div class="form-group">
121 125 <label for="since">{% trans "Since" %}</label>
122 126 <div class="input-group date" id="datepicker_since">
123   - <input type="text" class="form-control" placeholder="{% trans "Since" %}" name="since" value="{{ request.GET.since }}" />
  127 + <input type="text" class="form-control" placeholder="{% trans "Since" %}" name="since" value="{{ request.GET.since }}" {% if LANGUAGE_CODE == 'pt-br' %}data-format="dd/MM/yyyy"{% endif %} />
124 128 <span class="input-group-addon">
125 129 <span class="glyphicon glyphicon-calendar"></span>
126 130 </span>
... ... @@ -129,7 +133,7 @@
129 133 <div class="form-group">
130 134 <label for="until">{% trans "Until" %}</label>
131 135 <div class="input-group date" id="datepicker_until">
132   - <input type="text" class="form-control" placeholder="{% trans "Until" %}" name="until" value="{{ request.GET.until }}" />
  136 + <input type="text" class="form-control" placeholder="{% trans "Until" %}" name="until" value="{{ request.GET.until }}" {% if LANGUAGE_CODE == 'pt-br' %}data-format="dd/MM/yyyy"{% endif %} />
133 137 <span class="input-group-addon">
134 138 <span class="glyphicon glyphicon-calendar"></span>
135 139 </span>
... ...