view templates/sat_website/membership_form.html @ 78:6250b65523c6

categories' aliases can be defined to be able to use "French" links like adhesion.html
author souliane <souliane@mailoo.org>
date Tue, 09 Jun 2015 15:19:50 +0200
parents 13ebb548f234
children
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="membership_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 }}
                                {% if field.field.required %}
                                    <span class="glyphicon glyphicon-asterisk"></span>
                                {% endif %}
                                {% 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 %}