Move contact_form templates to contact_form app
This commit is contained in:
parent
10628ee45f
commit
806ee80a85
7 changed files with 15 additions and 11 deletions
|
@ -1 +0,0 @@
|
|||
{% extends "base.html" %}
|
|
@ -1,23 +0,0 @@
|
|||
{% extends "contact_form/base.html" %}
|
||||
{% load i18n crispy_forms_tags %}
|
||||
|
||||
{% block title %}{{ block.super }} - {% translate "Contact" %}{% endblock title %}
|
||||
{% block page_title %}{% translate "Contact" %}{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
{% crispy form %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script type="text/javascript">
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
let textFields = document.querySelectorAll("input[type=text]");
|
||||
|
||||
if (textFields[0].val() !== '') {
|
||||
document.getElementsByTagName("textarea")[0].focus();
|
||||
} else {
|
||||
textFields[0].focus();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endblock extra_js %}
|
|
@ -1,5 +0,0 @@
|
|||
User {{ name }} <{{ email }}> from IP address {{ remote_ip }}
|
||||
sent the following message via the contact form at
|
||||
{{ site }}{% url 'contact_form' %}:
|
||||
|
||||
{{ body }}
|
|
@ -1 +0,0 @@
|
|||
[{{ site.name }}] message from {{ name }} via contact form
|
|
@ -1,9 +0,0 @@
|
|||
{% extends "contact_form/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{{ block.super }} - {% translate "Contact" %}{% endblock title %}
|
||||
{% block page_title %}{% translate "Contact" %}{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
<p class="text-success">{% translate "Your message has been sent successfully." %}</p>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue