Move contact_form templates to contact_form app

This commit is contained in:
Jan Dittberner 2023-04-22 13:14:24 +02:00
parent 10628ee45f
commit 806ee80a85
7 changed files with 15 additions and 11 deletions

View file

@ -1 +0,0 @@
{% extends "base.html" %}

View file

@ -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 %}

View file

@ -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 }}

View file

@ -1 +0,0 @@
[{{ site.name }}] message from {{ name }} via contact form

View file

@ -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 %}