view templates/sat_website/adhesion_form.html @ 55:a1e457ac6871

split adhesion.html between adhesion.html and association.html
author souliane <souliane@mailoo.org>
date Tue, 05 May 2015 15:02:50 +0200
parents d721c8ffa22a
children bfa8009f0769
line wrap: on
line source

{% extends "sat_website/category.html" %}

{% comment %}
SàT website: Salut à Toi's presentation website
Copyright (C) 2012  Jérôme Poisson (goffi@goffi.org)

This file is part of SàT website.

SàT website is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Foobar is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
{% endcomment %}

{% load i18n %}
{% load staticfiles %}
{% load utils %}

{% block headline %}{% trans "Join the association" %}{% endblock %}
{% block main_container %}

<form class="form-signin" action="adhesion_form.html" method="post">
    {% csrf_token %}
    <fieldset>
        <legend>{% trans "Please complete this form" %}</legend>
        {% for section, fields in form.sections.items %}
            <div class="form-group">
                {% if section %}
                    <label for="{{ fields.0.auto_id }}">{{ section }}</label>
                {% endif %}
                {% for field in fields %}
	                {% if field.field.widget|is_radio %}
			            <div class="text-center" id="{{ field.auto_id }}_group" name="{{ field.name }}_group">
			                <span for="{{ field.auto_id }}">{{ field.label }}</span>
			                <div class="btn-group" data-toggle="buttons">
								{% for radio in field %}
	                                <label for="{{ radio.id_for_label }}" class="btn btn-default badge my-btn{% if field.value == radio.choice_value %} active{% endif %}">
    	                               {{ radio.tag }}{{ radio.choice_label }}
	                                </label>
								{% endfor %}
							</div>
                            <div>{{ field.help_text }}</div>
			            </div>
                    {% elif field.field.widget|is_checkbox %}
                        <div class="checkbox">
                            <label>
                                {% autoescape off %}
                                {{ field }}{{ field.label }} <span class="glyphicon glyphicon-asterisk"></span>
                                {% endautoescape %}
                            </label>
                        </div>
                    {% else %}
	                    {% if field.field.required %}
	                        <div class="input-group">
	                    {% endif %}
    	                {{ field }}
	                    {% if field.field.required %}
	                            <span class="input-group-addon"><span class="glyphicon glyphicon-asterisk"></span></span>
	                        </div>
	                    {% endif %}
                    {% endif %}
                    {% if field.errors %}
                        <div class="alert alert-danger" role="alert">{{ field.errors }}</div>
                    {% endif %}
                {% endfor %}
            </div>
        {% endfor %}
    </fieldset>
    <button class="btn btn-lg btn-primary btn-block" type="submit">{% trans "Confirm" %}</button>
</form>

{% endblock %}