Skip to content
This repository has been archived by the owner on Jul 6, 2018. It is now read-only.

Commit

Permalink
Improved demo and fixed small bug in vertical form
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan Verheul committed Mar 17, 2012
1 parent c9000d5 commit 179f6b9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
{% include "bootstrap_toolkit/field_help.html" with inline=False %}
{% include "bootstrap_toolkit/field_errors.html" with inline=False %}
{% else %}
<label class="nonfield{% if field.field.required %} required{% endif %}"{% if field.auto_id %} for="{{ field.auto_id }}"{% endif %}>{{ field.label }}</label>
{% if input_type == "radioset" %}
<label class="nonfield{% if field.required %} required{% endif %}">{{ field.label }}</label>
{% include "bootstrap_toolkit/field_choices.html" with type="radio" %}
{% include "bootstrap_toolkit/field_help.html" with inline=False %}
{% include "bootstrap_toolkit/field_errors.html" with inline=False %}
{% else %}
<label class="nonfield{% if field.field.required %} required{% endif %}"{% if field.auto_id %} for="{{ field.auto_id }}"{% endif %}>{{ field.label }}</label>
{% include "bootstrap_toolkit/field_default.html" %}
{% include "bootstrap_toolkit/field_help.html" with inline=True %}
{% include "bootstrap_toolkit/field_errors.html" with inline=False %}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='django-bootstrap-toolkit',
version='2.3.6',
version='2.3.7',
url='https://github.com/dyve/django-bootstrap-toolkit',
author='Dylan Verheul',
author_email='dylan@dyve.net',
Expand Down
3 changes: 2 additions & 1 deletion test_project/test_bootstrap/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
<ul class="dropdown-menu">
<a href="{% url test_bootstrap.views.test_form %}?layout=vertical">Vertical</a>
<a href="{% url test_bootstrap.views.test_form %}?layout=horizontal">Horizontal</a>
<a href="{% url test_bootstrap.views.test_form_inline %}">Inline</a>
<a href="{% url test_bootstrap.views.test_form_inline %}?layout=inline">Inline</a>
<a href="{% url test_bootstrap.views.test_form_inline %}?layout=search">Search</a>
<a href="{% url test_bootstrap.views.test_form_with_template %}?layout=horizontal">Using template</a>
</ul>
</li>
Expand Down
4 changes: 2 additions & 2 deletions test_project/test_bootstrap/templates/form_inline.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

{% block content %}

<h1>This is an inline form</h1>
<h1>This is form layout is {{ layout }}</h1>

<p>&nbsp;</p>

<form class="form-{{ layout }}" action="" method="post">

{% csrf_token %}

{{ form|as_bootstrap:"inline" }}
{{ form|as_bootstrap:layout }}

<input type="submit" class="text btn btn-primary">

Expand Down

0 comments on commit 179f6b9

Please sign in to comment.