project/templates/registration/manage_payments.html
author Madhusudan.C.S <madhusudancs@gmail.com>
Tue, 16 Nov 2010 18:33:10 +0530
branchpayments
changeset 267 efdc1fa99ef7
parent 266 316d522c7d43
child 290 3ea1acce0f78
permissions -rw-r--r--
Convert multiple conditions to nested if in template since Django has a bug with conditionals in templates.

{% extends "base.html" %}

{% block title %}Manage Payments - {% endblock %}

{% block content %}
<h1>Manage Payments</h1>

<form action="" method="post">

  <fieldset>
    <legend>Payment Details</legend>
    <table class="scipycon-default">
      {% for registrant in registrants %}
      <tr class="{% cycle odd,even %}">
        <th>
          <label
          {% if registrant.registrant.payment_set.get.type or registrant.registrant.payment_set.get.details %}
          {% if not registrant.registrant.payment_set.get.confirmed %}
          class="alert"
          {% endif %}
          {% endif %}
          for="id_{{ registrant.registrant.id }}_label">
            {{ registrant.registrant.get_full_name }}
          </label>
        </th>
        <td>
          {{ field.errors }}
          <input id="user_id_{{ registrant.registrant.id }}"
          name="registrant_id_{{ registrant.registrant.id }}"
          type="checkbox" name="paid"
          {% if registrant.registrant.payment_set.get.confirmed %}
          checked=checked
          {% endif %}
          /><br />
        </td>
      </tr>
      {% endfor %}
      <tr>
        <th>
        <button class="button left" type="submit">Submit Payment Status</button>
        </th>
      </tr>
    </table>
  </fieldset>

</form>
{% endblock content %}