From 2237a5b378d63967db673bf921088d8658a86dc1 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Tue, 31 Mar 2015 04:31:16 -0400 Subject: [PATCH] Remove fieldset from sub form template were causing some widgets to span the entire width of the screen. --- .../appearance/generic_form_instance.html | 61 +++++++++---------- 1 file changed, 29 insertions(+), 32 deletions(-) diff --git a/mayan/apps/appearance/templates/appearance/generic_form_instance.html b/mayan/apps/appearance/templates/appearance/generic_form_instance.html index f8a1a11cb1..c7f6d71930 100644 --- a/mayan/apps/appearance/templates/appearance/generic_form_instance.html +++ b/mayan/apps/appearance/templates/appearance/generic_form_instance.html @@ -40,41 +40,38 @@ {% for field in form.hidden_fields %} {{ field }} {% endfor %} -
- {% for field in form.visible_fields %} -
+ {% for field in form.visible_fields %} +
- {# We display the label then the field for all except checkboxes #} - {% if field|widget_type != 'checkboxinput' %} - {% if not hide_labels %}{{ field.label_tag }}{% if field.field.required and not read_only and not form_hide_required_text %} ({% trans 'required' %}){% endif %}{% endif %} - {% endif %} + {# We display the label then the field for all except checkboxes #} + {% if field|widget_type != 'checkboxinput' %} + {% if not hide_labels %}{{ field.label_tag }}{% if field.field.required and not read_only and not form_hide_required_text %} ({% trans 'required' %}){% endif %}{% endif %} + {% endif %} - {% if field|widget_type == 'checkboxinput' %} -
- -
- {% elif field|widget_type == 'detailselectmultiple' %} - {% if read_only %} - - {% else %} - {% render_field field class+="form-control" %} - {% endif %} - {% elif field|widget_type == 'clearablefileinput' %} - {# Don't add 'form-control' class to filebrowse fields #} - {% if field.errors %} - {% render_field field class+="form-control" %} - {% else %} - {% render_field field class+="" %} - {% endif %} + {% if field|widget_type == 'checkboxinput' %} +
+ +
+ {% elif field|widget_type == 'detailselectmultiple' %} + {% if read_only %} + {% else %} {% render_field field class+="form-control" %} {% endif %} - {% if field.help_text %}

{{ field.help_text }}

{% endif %} -
- {% endfor %} -
- + {% elif field|widget_type == 'clearablefileinput' %} + {# Don't add 'form-control' class to filebrowse fields #} + {% if field.errors %} + {% render_field field class+="form-control" %} + {% else %} + {% render_field field class+="" %} + {% endif %} + {% else %} + {% render_field field class+="form-control" %} + {% endif %} + {% if field.help_text %}

{{ field.help_text }}

{% endif %} + + {% endfor %} {% endif %}