diff --git a/HISTORY.rst b/HISTORY.rst index fd41360fed..43301dfb24 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -143,7 +143,7 @@ - Removing running workflow instances in document of a specific type if that document type is removed from the workflow. - Make error messages persistent and increase the timeout of warning to 10 seconds. - +- Improve rendering of the details form. 2.7.3 (2017-09-11) ================== diff --git a/mayan/apps/appearance/templates/appearance/generic_form_instance.html b/mayan/apps/appearance/templates/appearance/generic_form_instance.html index 11f21d530c..8417404443 100644 --- a/mayan/apps/appearance/templates/appearance/generic_form_instance.html +++ b/mayan/apps/appearance/templates/appearance/generic_form_instance.html @@ -55,9 +55,33 @@ {% if not hide_labels %}{{ field.label }}{% if field.field.required and not read_only %} ({% trans 'required' %}){% endif %}{% endif %} - {% elif field|widget_type == 'detailselectmultiple' %} + {% elif field|widget_type == 'emailinput' %} {% if read_only %} - + {{ field.value }} + {% else %} + {% render_field field class+="form-control" %} + {% endif %} + {% elif field|widget_type == 'textinput' %} + {% if read_only %} + {{ field.value }} + {% else %} + {% render_field field class+="form-control" %} + {% endif %} + {% elif field|widget_type == 'textarea' %} + {% if read_only %} + {{ field.value }} + {% else %} + {% render_field field class+="form-control" %} + {% endif %} + {% elif field|widget_type == 'select' %} + {% if read_only %} + {{ field|get_choice_value }} + {% else %} + {% render_field field class+="form-control" %} + {% endif %} + {% elif field|widget_type == 'selectmultiple' %} + {% if read_only %} + {{ field|get_choice_value }} {% else %} {% render_field field class+="form-control" %} {% endif %} @@ -87,6 +111,7 @@ {% else %} {% render_field field class+="form-control" %} {% endif %} + {% if field.help_text %}

{{ field.help_text|safe }}

{% endif %} {% endfor %}