Reformatted and reindented the submit registration form and also URLs to comply with scope based system.
--- a/project/templates/registration/submit-registration.html Wed Jul 21 02:03:09 2010 +0530
+++ b/project/templates/registration/submit-registration.html Wed Jul 21 02:04:03 2010 +0530
@@ -3,9 +3,11 @@
{% block title %}Submit Registration{% endblock %}
{% block content %}
+ {% block formheading %}
+ <h1>Submit Registration</h1>
+ {% endblock formheading %}
- <h1>Submit Registration</h1>
-
+ {% block overreg %}
{% if over_reg %}
<div class="notice">
We have already reached the total number of registrations for the
@@ -15,92 +17,114 @@
pay the admission fee.</strong>
</div>
{% endif %}
- <form action="/submit-registration/"
- method="post">
- {% if not user.is_authenticated %}
- <fieldset>
- <legend>Have you already registered for the conference?</legend>
- <table class="scipycon-default">
- {{ login_form }}
- </table>
+ {% endblock overreg %}
- <input type="hidden"
- name="action"
- value="login" />
+ <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>
- <button class="button left"
- type="submit">
- Login
- </button>
- </fieldset>
+ <input type="hidden" name="action" value="login" />
- </form>
+ <button class="button left" type="submit">Login</button>
+ </fieldset>
+
+ </form>
{% endif %}
<p></p>
{% if not user.is_authenticated %}
- <br />
- <form action="/submit-registration/"
- enctype="multipart/form-data"
- method="post">
- <fieldset>
- <legend>Registrant Details</legend>
- <table class="scipycon-default required">
- {{ registrant_form }}
- </table>
+ <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>
+ <input type="hidden" name="action" value="register" />
+ </fieldset>
{% endif %}
- <br />
+ <br />
+
+ {% if registration_form.errors %}
+ <div class="errors">Please correct the errors below</div>
+ {% endif %}
-{% if registration_form.errors %}<div class="errors">Please correct the errors below</div>{% endif %}
-
- <fieldset>
- <legend>Details</legend>
- <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 %}
+ <fieldset>
+ <legend>Details</legend>
+ <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 %}
+ {% 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 />
- </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 required">
- {% 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>Others</legend>
- <table class="scipycon-default">
- {{ wifi_form }}
- </table>
+ <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>
- <button class="button left"
- type="submit">
- Submit Registration
- </button>
- </fieldset>
- </form>
+ <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>
+ </script>
{% endif %}
{% endblock content %}