{% extends "cms/home.html" %}
{% load crispy_forms_tags i18n %}

{% block title %}{% trans "Classes" %}{% endblock %}

{% block body_id %}classes{% endblock %}

{% block content %}
	{% block summary %}
		<div class="regsummary regsummarywell well well-sm">

			<table class="table">
			<thead>
			<tr>
			<th colspan="2">{% trans "You've selected:" %}</th>
			</tr>

			</thead>
			<tbody>
			{% for id,series in regInfo.series.items %}
				<tr>
					<td>{{ series.name }}{% if series.role_name %} - {{ series.role_name }}{% endif %}</td>
					<td>{{ currencySymbol }}{{ series.base_price|floatformat:2 }}</td>
				</tr>
			{% endfor %}
			{% for id,event in regInfo.events.items %}
				<tr>
					<td>{{ event.name }}</td>
					<td>{{ currencySymbol }}{{ event.base_price|floatformat:2 }}</td>
				</tr>
			{% endfor %}
			</tbody>
			<tbody>
				<tr class="subtotal">
					<th>{% trans "Subtotal before discounts:" %}</th>
					<th>{{ currencySymbol }}{{ subtotal|floatformat:2 }}</th>
				</tr>
			</tbody>
			</table>
		</div>
	{% endblock %}

	{# Display any warning or error messages associated with the previous form submission #}
	<div id="message-alerts">
    {% for message in messages %}
	    <div class="alert {% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}alert-danger{% elif message.level == DEFAULT_MESSAGE_LEVELS.WARNING %}alert-warning{% else %}alert-info{% endif %}">{{ message }}</div>
    {% endfor %}
    </div>


	{% block form %}
		<h3>{% trans "Step 2: Provide Your Student Information" %}</h3>

		{% if show_ajax_form %}
			{% include "account/ajax_login.html" %}

		<div class="panel panel-default">
			<div class="panel-body">

		{% endif %}
				<form action="" method="post">
				    {% csrf_token %}
				    {% crispy form %}
				</form>
		{% if show_ajax_form %}
			</div>
		</div>
		{% endif %}
	{% endblock %}
{% endblock %}
