/
minute.twig
33 lines (31 loc) · 1011 Bytes
/
minute.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{#
/**
* Minute dropdown Html
* @var $minuteId
* @var $currentminute
* @var $dropdown_dates_minute_step
* @var $datepart
*/
#}
<!-- minute -->
<label for="minute{{ minuteId }}" class="sr-only control-label">
{{ gT('Minute') }}
</label>
<select id="minute{{ minuteId }}" name="minute{{ minuteId }}" class="minute form-control">
<option value="">
{{ gT('Minute') }}
</option>
{% for i in 0..59 %}
{% if i is divisible by(dropdown_dates_minute_step) %}
{# currentminute are sent as padded integer ( '00','01'), i is integer, need testing !== '' and intval #}
<option value="{{ i }}"{% if (currentminute is not same as('') and i == intval(currentminute)) %} selected{% endif %}>
{% if datepart is same as('i') %}
{{ sprintf('%02d', i) }}
{% else %}
{{ i }}
{% endif %}
</option>
{% endif %}
{% endfor %}
</select>
<!-- end of minute -->