{% macro interval_input(obj, attrname, scales) -%}

<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>


{%- endmacro %}
