{# Label #} {% include "objects/property_label.html" %} {# View #}
{{ data | format_quantity(schema) }}
{{ _('Your input is not valid. Please check.') }}
{# Form #}
{% if schema['units'] in ("1", "") %} {% else %}
{% if schema['units'] is string or schema['units'] | length == 1 %} {% set unit = schema["units"] if schema["units"] is string else schema["units"][0] %} {% if data is not none %}{{ (data | to_datatype).units | prettify_units }}{% else %}{{ unit | prettify_units }}{% endif %} {% else %} {% if id_prefix + '_units' in form_data %} {% set selected_unit = form_data[id_prefix + '_units'] %} {% elif data is not none %} {% set selected_unit = (data | to_datatype).units %} {% else %} {% set selected_unit = schema['units'][0] %} {% endif %} {% endif %}
{% endif %} {% if id_prefix+'_magnitude' in errors %} {{ _('Error:') }} {{ errors[id_prefix+'_magnitude'] }}{% endif %} {% if 'note' in schema %} {{ _('Note:') }} {{ schema['note'] | get_translated_text }}{% endif %}