update to bootstrap 4
This commit is contained in:
		
							
								
								
									
										26
									
								
								templates/includes/form.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								templates/includes/form.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
			
		||||
{% load form_tags widget_tweaks %}
 | 
			
		||||
 | 
			
		||||
{% if form.non_field_errors %}
 | 
			
		||||
    <div class="alert alert-danger" role="alert">
 | 
			
		||||
        {% for error in form.non_field_errors %}
 | 
			
		||||
            <p{% if forloop.last %} class="mb-0"{% endif %}>{{ error }}</p>
 | 
			
		||||
        {% endfor %}
 | 
			
		||||
    </div>
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
{% for field in form %}
 | 
			
		||||
    <div class="form-group">
 | 
			
		||||
        {{ field.label_tag }}
 | 
			
		||||
        {% render_field field class=field|input_class %}
 | 
			
		||||
        {% for error in field.errors %}
 | 
			
		||||
            <div class="invalid-feedback">
 | 
			
		||||
                {{ error }}
 | 
			
		||||
            </div>
 | 
			
		||||
        {% endfor %}
 | 
			
		||||
        {% if field.help_text %}
 | 
			
		||||
            <small class="form-text text-muted">
 | 
			
		||||
                {{ field.help_text|safe }}
 | 
			
		||||
            </small>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
    </div>
 | 
			
		||||
{% endfor %}
 | 
			
		||||
		Reference in New Issue
	
	Block a user