project/templates/registration/submit-registration.html
author Madhusudan.C.S <madhusudancs@gmail.com>
Mon, 08 Nov 2010 00:47:57 +0530
changeset 200 e31a620a511b
parent 191 0eb941d14ec3
child 201 2363acb15410
permissions -rw-r--r--
Add html form fields for accommodation forms.

{% extends "base.html" %}

{% block title %}Submit Registration{% endblock %}

{% block content %}
    {% block formheading %}
      <h1>Submit Registration</h1>
    {% endblock formheading %}

    {% block overreg %}
    {% if over_reg %}
    <div class="notice">
      We have already reached the total number of registrations for the
      conference. If you would like to be put on a waiting list in the event that
      someone can't make it to the conference, please register below and we
      will be in contact if a registration spot comes available. <strong>N.B. Do not
      pay the admission fee.</strong>
    </div>
    {% endif %}
    {% endblock overreg %}

    <form action=
    {% block url_select_login %}
      "{% url scipycon_submit_registration params.scope %}"
    {% endblock url_select_login %}
        method="post">
    {% if not user.is_authenticated %}
      <fieldset>
        <legend>Have you already registered for the conference?</legend>
        <table class="scipycon-default">
          {{ login_form }}
        </table>

        <input type="hidden" name="action" value="login" />

        <button class="button left" type="submit">Login</button>
      </fieldset>

    </form>
    {% endif %}

    <p></p>

    {% if not user.is_authenticated %}
    <br />
    <form action=
    {% block url_select_reg %}
      "{% url scipycon_submit_registration params.scope %}"
    {% endblock url_select_reg %}
        enctype="multipart/form-data" method="post">
      <fieldset>
        <legend>Registrant Details</legend>
        <table class="scipycon-default required">
          {{ registrant_form }}
        </table>

        <input type="hidden" name="action" value="register" />
      </fieldset>
    {% endif %}
    <br />

    {% if registration_form.errors %}
      <div class="errors">Please correct the errors below</div>
    {% endif %}

      <fieldset>
        <legend>Details</legend>
        <strong>SciPy.in has a registration fee and nominal charges for
        accommodation of out station students and teachers. Please
        make sure you read the details before you register.
        <a href="{% url scipycon_fees params.scope %}">Click here</a>
        for details.</strong>
        <table class="scipycon-default required">
          {% for field in registration_form.personal_fields %}
            <tr class="{% cycle odd,even %}">
              <th>{{ field.label_tag }}</th>
              <td>{{ field.errors }}{{ field }}<br />{{ field.help_text }}</td>
            </tr>
          {% endfor %}

          {% for field in registration_form.other_fields %}
            <tr class="{% cycle odd,even %}">
              <th>{{ field.label_tag }}</th>
              <td>{{ field.errors }}{{ field }}<br />{{ field.help_text }}</td>
            </tr>
          {% endfor %}
        </table>
      </fieldset>
      <br />

      <fieldset>
        <legend>Occupation</legend>
        <table class="scipycon-default required">
          {% for field in registration_form.occupation_fields %}
            <tr class="{% cycle odd,even %}">
              <th>{{ field.label_tag }}</th>
              <td>
                {{ field.errors }}{{ field }}<br />{{ field.help_text }}
              </td>
            </tr>
          {% endfor %}
        </table>
      </fieldset>

      <fieldset>
        <legend>Demographics</legend>
        <table class="scipycon-default">
          {% for field in registration_form.demographic_fields %}
            <tr class="{% cycle odd,even %}">
              <th>{{ field.label_tag }}</th>
              <td>
                {{ field.errors }}{{ field }}<br />{{ field.help_text }}
              </td>
            </tr>
          {% endfor %}
        </table>
      </fieldset>

      <fieldset>
        <legend>Accommodation</legend>
        <table class="scipycon-default">
          {{ acco_form }}
        </table>
      </fieldset>

      <fieldset>
        <legend>Others</legend>
        <table class="scipycon-default">
          {{ wifi_form }}
        </table>

        <button class="button left" type="submit">Submit Registration</button>
      </fieldset>

      {% block formextras %}{% endblock formextras %}
    </form>
    {% if message %}
    <script type="text/javascript">
        $.jGrowl("{{ message }}");
    </script>
    {% endif %}
{% endblock content %}