Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for bootstrap 3 horizontal forms
- Loading branch information
Showing
13 changed files
with
92 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,3 +91,4 @@ Contributors | |
* Gabe Jackson <gabejackson> | ||
* Camilo Nova <camilonova> | ||
* <mrkre> | ||
* Daniel Mascarenhas <danielmt> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{% load crispy_forms_field %} | ||
|
||
{% if field.is_hidden %} | ||
{{ field }} | ||
{% else %} | ||
{% if field|is_checkbox %} | ||
<div class="form-group"> | ||
{% endif %} | ||
<{% if tag %}{{ tag }}{% else %}div{% endif %} id="div_{{ field.auto_id }}" {% if not field|is_checkbox %}class="form-group{% else %}class="checkbox{% endif %}{% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if form_show_errors%}{% if field.errors %} has-error{% endif %}{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}"> | ||
{% if field.label and not field|is_checkbox and form_show_labels %} | ||
<label for="{{ field.id_for_label }}" class="control-label {{ label_class }}{% if field.field.required %} requiredField{% endif %}"> | ||
{{ field.label|safe }}{% if field.field.required %}<span class="asteriskField">*</span>{% endif %} | ||
</label> | ||
{% endif %} | ||
|
||
{% if field|is_checkboxselectmultiple %} | ||
{% include 'bootstrap3/layout/checkboxselectmultiple.html' %} | ||
{% endif %} | ||
|
||
{% if field|is_radioselect %} | ||
{% include 'bootstrap3/layout/radioselect.html' %} | ||
{% endif %} | ||
|
||
{% if not field|is_checkboxselectmultiple and not field|is_radioselect %} | ||
{% if field|is_checkbox and form_show_labels %} | ||
{% if label_class %} | ||
<label class="{{ label_class }}"></label> | ||
<div class="controls {{ field_class }}"> | ||
{% endif %} | ||
<label for="{{ field.id_for_label }}" class="{% if field.field.required %} requiredField{% endif %}"> | ||
{% crispy_field field %} | ||
{{ field.label|safe }} | ||
{% include 'bootstrap3/layout/help_text_and_errors.html' %} | ||
</label> | ||
{% if label_class %} | ||
</div> | ||
{% endif %} | ||
{% else %} | ||
<div class="controls {{ field_class }}"> | ||
{% crispy_field field %} | ||
{% include 'bootstrap3/layout/help_text_and_errors.html' %} | ||
</div> | ||
{% endif %} | ||
{% endif %} | ||
</{% if tag %}{{ tag }}{% else %}div{% endif %}> | ||
{% if field|is_checkbox %} | ||
</div> | ||
{% endif %} | ||
{% endif %} |
2 changes: 1 addition & 1 deletion
2
crispy_forms/templates/bootstrap3/layout/checkboxselectmultiple.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters