{% extends "formunculous/base.html" %}

{% load i18n %}
{% block css %}{{ block.super }}
<link href="{{ MEDIA_URL }}formunculous/css/formunculous.css" rel="stylesheet" type="text/css" />
{% endblock %}

{% block title %}{{ ad.name}} {% trans "Submission Confirmation" %}{% endblock %}
{% block content_title %}{{ ad.name}} {% trans "Submission Confirmation" %}{% endblock %}
{% block content %}

<p>
  {% blocktrans with ad.name as appname %}
   Thank you for completing <i>{{ appname }}</i>.
  {% endblocktrans %}
</p>
<p>
   {% blocktrans %}
      Confirm the information below before clicking the continue link.  
      If any of the information is incorrect, click the cancel link and make
      any needed corrections before submitting.
   {% endblocktrans %}
</p>
<div class="formunculous_confirmation_info">
  <ul class="formunculous_form_info">
	{% for field in fields %}
	   <li>
	      <span class="formunculous_field_label">{{ field.label }}:</span>
		  <span class="formunculous_field_data">
			{% if field.data.url %}
			<a target="_blank" href="{{ field.data.url }}">
			{% endif %}
			{{ field.data }}
			{% if field.data.url %}
			</a>
			{% endif %}
		  </span>
	   </li>
    {% endfor %}
  </ul>
  {% if sub_apps %}
  {% for sub_app_group in sub_apps %}
    <h3 class="formunculous_sub_ad_title">{{ sub_app_group.sub_ad.name }}</h3>
	{% for sub_app in sub_app_group.sub_apps %}
	  <ul class="formunculous_form_info formunculous_sub_form_info">
		{% for field in sub_app.fields %}
		  <li>
			<span class="formunculous_field_label">{{ field.label }}:</span>
			<span class="formunculous_field_data">
			  {% if field.data.url %}
			  <a target="_blank" href="{{ field.data.url }}">
				{% endif %}
				{{ field.data }}
				{% if field.data.url %}
			  </a>
			  {% endif %}
			</span>
		  </li>
		{% endfor %}
	  </ul>
	{% endfor %}
  {% endfor %}
  {% endif %}
</div>
<div class="formunculous_confirmation_bar">
  <ul>
	<li>
	  <span class="formunculous_continue_link"><a href="{% url formunculous-submit ad.slug, app.id %}">{% trans "Continue" %}</a></span>
	</li>
	<li>
	  <span class="formunculous_cancel_link"><a href="{% url formunculous-apply ad.slug %}">{% trans "Cancel" %}</a></span>
	</li>
  </ul>
</div>
{% endblock %}
