view templates/sat_website/adhesion_form.html @ 34:9d553570cc61

add adhesion_form.html and thank_you.html
author souliane <souliane@mailoo.org>
date Tue, 27 Jan 2015 08:20:30 +0100
parents
children dfe7139dae0a
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" 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{% 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>
				                {{ field }}{{ field.label }} <span class="glyphicon glyphicon-asterisk"></span>
				            </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 %}