2017-08-01 20:57:15 +02:00
|
|
|
{% macro interval_input(obj, attrname, scales) -%}
|
|
|
|
|
2017-08-04 10:44:05 +02:00
|
|
|
<span style='display:inline-block'>
|
|
|
|
<input type=number name={{attrname}}_significand
|
|
|
|
value={{obj[attrname + '_significand']}}
|
|
|
|
min=0 step=1>
|
|
|
|
<select name={{attrname}}_scale>
|
|
|
|
{%- for scale in scales %}
|
|
|
|
<option value="{{scale[1].total_seconds()}}"
|
|
|
|
{{- ' selected' if scale[1] == obj[attrname + '_scale'] -}}
|
|
|
|
>{{scale[0]}}</option>
|
|
|
|
{% endfor -%}
|
|
|
|
</select>
|
|
|
|
</span>
|
2017-08-01 20:57:15 +02:00
|
|
|
|
|
|
|
|
|
|
|
{%- endmacro %}
|