Template enhancements
* adds configurable label-input ratio setting for forms and specializes for RemoveModalForm * enhances form body html structure for better UX and usage of label-input ratio
This commit is contained in:
@@ -4,12 +4,18 @@
|
||||
<tbody>
|
||||
{% for field in form %}
|
||||
<tr title="{{ field.help_text }}" class="{% if field.errors %}alert-danger{% endif %}">
|
||||
<th scope="row" class="col-sm-3">
|
||||
<label for="id_{{ field.name }}">{{ field.label }}<span class="label-required">{% if field.field.required %}*{% endif %}</span></label>
|
||||
<br>
|
||||
<small>{{ field.help_text }}</small>
|
||||
{{form.small_label_column}}
|
||||
<th scope="row" class="col-sm-{{form.label_input_ratio.0}}">
|
||||
<label for="id_{{ field.name }}">
|
||||
{{ field.label }}
|
||||
<span class="label-required">
|
||||
{% if field.field.required %}*{% endif %}
|
||||
</span>
|
||||
<br>
|
||||
<small>{{ field.help_text }}</small>
|
||||
</label>
|
||||
</th>
|
||||
<td class="col-sm-9">
|
||||
<td class="col-sm-{{form.label_input_ratio.1}}">
|
||||
{{ field }}
|
||||
{% for error in field.errors %}
|
||||
<br>
|
||||
|
||||
Reference in New Issue
Block a user