src/cm/templates/site/contact.html
author Production Moz <dev@sopinspace.com>
Sat, 19 May 2012 10:21:54 +0200
changeset 438 fcc5e2f0befd
parent 0 40c8f766c9b8
child 439 8994d24e4b2f
permissions -rw-r--r--
Fix side effects with csrf token, add csrf_token to every post form + add ajax (see http://stackoverflow.com/questions/5100539/django-csrf-check-failing-with-an-ajax-post-request), remove django.middleware.csrf.CsrfViewMiddleware ?!

{% extends "site/layout/base_workspace.html" %}
{% load com %}
{% load i18n %}

{% block title %}
{% blocktrans %}Contact{% endblocktrans %}
{% endblock %}

{% block head %}
{% endblock %}

{% block content %}

<h1>Contact</h1>
<form id="profile" enctype="multipart/form-data" class="wizard-form" action="." method="post">{% csrf_token %}
<table class="wide_form">
    <tbody>
        {% include "site/macros/form_fields.html" %}
    <tr>
        <td style="vertical-align: top; width: 20%; text-align:right;">
        </td>
        <td>
            <label></label>
            <input name="send" type="submit" value="{% blocktrans %}Send{% endblocktrans %}"/>
            
		 	<input name="cancel" type="button" id="cancel_button" value="{% blocktrans %}Cancel{% endblocktrans %}"/>
		    <script type="text/javascript">
		    <!--
		    $(document).ready(function(){
		        $("#cancel_button").click(function (e) { 
		            window.location = "{% url index %}";
		            e.stopPropagation(); 
		          });                
		    }) ;
		    -->
		    </script>            
        </td>
    </tr>
    </tbody>
</table>
</form>
{% endblock %}