* fixes group check on detail views * adds check for required fields in BaseForm for showing required field hint or not in template
		
			
				
	
	
		
			22 lines
		
	
	
		
			939 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			939 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
{% load i18n %}
 | 
						|
        <table class="table">
 | 
						|
            <tbody>
 | 
						|
                {% for field in form %}
 | 
						|
                <tr title="{{ field.help_text }}" class="{% if field.errors %}error{% endif %}">
 | 
						|
                    <th scope="row" class="col-sm-3">
 | 
						|
                        <div>{{ field.label }}<span class="label-required">{% if field.field.required %}*{% endif %}</span></div>
 | 
						|
                        <small>{{ field.help_text }}</small>
 | 
						|
                    </th>
 | 
						|
                    <td class="col-sm-9">
 | 
						|
                        {{ field }}
 | 
						|
                        {% for error in field.errors %}
 | 
						|
                        <strong>{{ error }}</strong>
 | 
						|
                        {% endfor %}
 | 
						|
                    </td>
 | 
						|
                </tr>
 | 
						|
                {% endfor %}
 | 
						|
            </tbody>
 | 
						|
        </table>
 | 
						|
        {% if form.has_required_fields %}
 | 
						|
        <small>{% trans 'Fields with * are required.' %}</small>
 | 
						|
        {% endif %} |