camp/content/templates/contact.html

31 lines
800 B
HTML
Raw Permalink Normal View History

2018-02-21 15:01:25 +00:00
{% extends 'base.html' %}
{% block content %}
<div class="large-8 medium-8 columns special-column">
<div class="index-text">
{% if sent %}
<p>Thanks for getting in touch!</p>
{% else %}
2018-03-07 16:25:55 +00:00
<form id="contact" method="post">
<input id="csrf" type='hidden' name='csrfmiddlewaretoken' value='' />
2018-02-21 15:01:25 +00:00
{{form}}
<br>
2018-03-07 16:25:55 +00:00
<input id="captcha" type="button" value="Send Message">
2018-02-21 15:01:25 +00:00
</form>
{% endif %}
</div>
</div>
{% endblock %}
2018-03-07 16:25:55 +00:00
{% block end %}
<script>
$('#captcha').on({
click: function() {
2018-03-24 08:55:51 +00:00
var token = $('input[name="csrfmiddlewaretoken"]')[1].value;
$('#csrf').val(token)
2018-03-07 16:25:55 +00:00
$('#contact').submit()
}
});
</script>
2018-03-24 08:55:51 +00:00
{% csrf_token %}
2018-03-07 16:25:55 +00:00
{% endblock %}