{% extends form_template %}
{% load styled_forms %}
{% load forms_tags %}

{% block title %}{{ form.title }}{% endblock %}
{% block meta_description %}{{ form.intro }}{% endblock %}

{% block extra_head %}
{{ block.super }}
<link rel="stylesheet" href="{{ STATIC_URL }}css/forms.css">

{% endblock extra_head %}

{% block body %}

<div class="t">
    {% if request.user.is_authenticated %}
        {% forms_nav request.user form %}
    {% endif %}
    
    <div class="form-wrap">
        <h1>{{ form.title }}</h1>
        <div>{{ form.intro|safe|urlize }}</div>

    	<div class="form-builder-wrap">
        	<form method="post" enctype="multipart/form-data">{% csrf_token %}
            <div style="display:none">
                <input type="hidden" name="entry_path" value="{{ request.path }}">
            </div>
        	<div class="forms">
                {{ form_for_form|styled_form }}
            	<input type="submit" value="Submit" />
    		</div>
            </form>
        </div>
    </div>
</div>
{% endblock %}

{% block extra_body %}
    {{ block.super }}
    <script type="text/javascript" src="{{ STATIC_URL }}js/email-verification.js"></script>
    <script type="text/javascript">
		$(document).ready(function(){
			$('.custom-price').closest('label').attr('for', '');
		});
    </script>
{% endblock %}
