{{form_mod_math.math_mod(class_='form-control btn btn-sm')}}
{{form_mod_math.math_delete(class_='form-control btn btn-sm',**{'onclick':'return confirm("Are you sure you want to delete this?")'})}}
{{form_mod_math.period.label(class_='control-label')}}
{{form_mod_math.period(class_='form-control', value=each_math.period, **{'title':_('The duration (seconds) between math calculations')})}}
{{form_mod_math.start_offset.label(class_='control-label')}}
{{form_mod_math.start_offset(class_='form-control', value=each_math.start_offset, **{'title':_('The duration (seconds) to wait before the first operation')})}}
{{form_mod_math.max_measure_age.label(class_='control-label')}}
{{form_mod_math.max_measure_age(class_='form-control', value=each_math.max_measure_age)}}
{% if channels > 1 %}
{{dict_translation['measurements_enabled']['title']}}
{%- set all_measurements = table_device_measurements.query.filter(
and_(table_device_measurements.device_id == each_math.unique_id,
table_device_measurements.is_enabled)).all() -%}
{% include 'pages/data_options/TEMPLATE_Measurements_Enabled_Info.html' %}
{% if 'enable_single_measurement_select' in math_info[each_math.math_type] and math_info[each_math.math_type]['enable_single_measurement_select'] %}
{{form_mod_math.select_measurement_unit.label(class_='control-label')}}
{{dict_translation['select_one']['title']}}
{%- set each_measurement = table_device_measurements.query.filter(
and_(table_device_measurements.device_id == each_math.unique_id,
table_device_measurements.channel == 0)).first() -%}
{%- if each_measurement -%}
{% for each_submit, each_display in choices_measurements_units.items() %}
{{each_display}}
{% endfor %}
{% endif %}
{% endif %}
{% endif %}
{% for each_math_template in math_templates if each_math_template[:-5] == each_math.math_type %}
{% include 'pages/data_options/math_options/'+each_math_template %}
{% endfor %}
{% include 'pages/data_options/math_options/TEMPLATE_OPTIONS_Measurements_Convert.html' %}