Feat: \n 1. Contact Us page form submission success page created. \n 2. Contact Us page styling and CAPTCHA text content. \n 3. Removal of ERP, Google CAPTCHA, and ALTCHA API code and left over comments in JavaScript, Python.
This commit is contained in:
@@ -2,25 +2,6 @@
|
||||
|
||||
{% block page_head %}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='dist/css/core_contact.bundle.css') }}">
|
||||
{#
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@altcha/browser@latest/dist/index.js" defer></script>
|
||||
#}
|
||||
{# with CDN
|
||||
<script src="https://cdn.jsdelivr.net/npm/@altcha/browser@1.1.0/dist/altcha.min.js"></script>
|
||||
<style>
|
||||
.altcha-widget {
|
||||
margin: 15px 0;
|
||||
}
|
||||
</style>
|
||||
#}
|
||||
{# with locally stored vendor project - this is imported into contact.js
|
||||
<script type="module" src="{{ url_for('static', filename='js/vendor/altcha.js')}}"></script>
|
||||
#}
|
||||
<style>
|
||||
.altcha-widget {
|
||||
margin: 15px 0;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block page_nav_links %}
|
||||
@@ -31,36 +12,14 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block page_body %}
|
||||
{#
|
||||
<script>
|
||||
function loadRecaptcha() {
|
||||
var script = document.createElement('script');
|
||||
script.src = "https://www.google.com/recaptcha/enterprise.js?render=6Lf8Q8cpAAAAAFAawGu4-ma60bvbEixNVTVvRzKe";
|
||||
script.async = true;
|
||||
document.body.appendChild(script);
|
||||
}
|
||||
|
||||
window.addEventListener('load', loadRecaptcha);
|
||||
</script>
|
||||
#}
|
||||
|
||||
{% set form = model.form_contact %}
|
||||
<section class="contact-section">
|
||||
<div class="contact-form">
|
||||
<h1>Contact Us</h1>
|
||||
<p>Please fill in the form below and we'll get back to you as soon as possible.</p>
|
||||
|
||||
{% with messages = get_flashed_messages() %}
|
||||
{% if messages %}
|
||||
<ul class="flashes">
|
||||
{% for message in messages %}
|
||||
<li>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
<form id="{{ model.ID_CONTACT_FORM }}" method="POST" action="{{ url_for('routes_core.contact') }}">
|
||||
<form id="{{ model.ID_CONTACT_FORM }}" method="POST" action="{{ model.HASH_POST_CONTACT_FORM }}">
|
||||
{{ form.csrf_token }}
|
||||
|
||||
<div class="form-grid">
|
||||
@@ -90,27 +49,17 @@
|
||||
{{ model.form_contact.receive_marketing.label }}
|
||||
</div>
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_CAPTCHA }}">
|
||||
{# {{ model.form_contact.recaptcha() }} #}
|
||||
{#
|
||||
<altcha-widget
|
||||
challengeurl="https://eu.altcha.org/api/v1/challenge?apiKey={{ model.app.app_config.ALTCHA_API_KEY }}"
|
||||
spamfilter
|
||||
></altcha-widget>
|
||||
#}
|
||||
<div>
|
||||
{{ form.altcha.label }}
|
||||
{#
|
||||
{{ form.altcha }}
|
||||
{{ form.altcha.hidden() }}
|
||||
#}
|
||||
<altcha-widget
|
||||
class="altcha-widget"
|
||||
challengeurl="{{ url_for('routes_core.create_altcha_challenge') }}"
|
||||
challengeurl="{{ model.HASH_GET_ALTCHA_CHALLENGE }}"
|
||||
auto="onload"
|
||||
id="{{ form.altcha.id }}"
|
||||
name="{{ form.altcha.name }}"
|
||||
></altcha-widget>
|
||||
</div>
|
||||
<p>This CAPTCHA mechanism is fully GDPR-compliant with no cookies, no fingerprinting, no tracking, and runs in the background so you don't need to do anything!</p>
|
||||
</div>
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }}">
|
||||
{{ model.form_contact.submit() }}
|
||||
@@ -119,74 +68,13 @@
|
||||
|
||||
<div class="data-notice">
|
||||
<h3>How we use your information</h3>
|
||||
<p>We will use the information you provide in this form to:</p>
|
||||
<ul>
|
||||
<li>Respond to your inquiry about our ERP implementation services</li>
|
||||
<li>Create and send you a proposal if requested</li>
|
||||
<li>Contact you regarding your interest in our services</li>
|
||||
</ul>
|
||||
|
||||
<p>If you opt in to marketing communications, we will also use your email address to send you updates about our services, ERPNext features, and relevant industry news. You can unsubscribe from these communications at any time.</p>
|
||||
|
||||
<p>We retain contact form submissions for customer service purposes and retain marketing consent records as required by law. For details about how long we keep your information, please see our <a href="{{ url_for('routes_legal.retention_schedule') }}">data retention schedule</a>.</p>
|
||||
|
||||
<p>For full details about how we handle your personal data, please read our <a href="{{ url_for('routes_legal.privacy_policy') }}">Privacy Policy</a>.</p>
|
||||
<p>We retain contact form submissions for customer service purposes and retain marketing consent records as required by law. For details about how long we keep your information, please see our <a href="{{ model.HASH_PAGE_DATA_RETENTION_SCHEDULE }}">data retention schedule</a>.</p>
|
||||
<p>For full details about how we handle your personal data, please read our <a href="{{ model.HASH_PAGE_PRIVACY_POLICY }}">Privacy Policy</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{# included in footer now
|
||||
<section class="contact-details">
|
||||
<div class="{{ model.FLAG_CONTAINER }}">
|
||||
<h2>Our contact details</h2>
|
||||
<div class="expertise-card">
|
||||
<ul>
|
||||
<li>Email: {{ model.get_mail_contact_public() }}</li>
|
||||
<li>LinkedIn: <a href="https://www.linkedin.com/in/teddyms/">linkedin.com/in/teddyms</a></li>
|
||||
<li>GitHub: <a href="https://github.com/Teddy-1024/">github.com/Teddy-1024</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
#}
|
||||
|
||||
{# with CDN
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Initialize ALTCHA widget
|
||||
ALTCHA.init({
|
||||
selector: '.altcha-widget',
|
||||
challenge: {
|
||||
url: '/get-challenge',
|
||||
onSuccess: function(result, element) {
|
||||
// Store the result in the hidden input field
|
||||
const hiddenInput = element.parentNode.querySelector('input[type="hidden"]');
|
||||
hiddenInput.value = JSON.stringify(result);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
#}
|
||||
|
||||
{# with locally stored vendor project - this is now in contact.js
|
||||
<script type="module">
|
||||
import { Altcha } from "{{ url_for('static', filename='js/vendor/altcha.js') }}";
|
||||
window.ALTCHA = { init: (config) => {
|
||||
document.querySelectorAll(config.selector).forEach(el => {
|
||||
new Altcha({
|
||||
target: el,
|
||||
props: {
|
||||
challengeurl: config.challenge.url,
|
||||
auto: 'onload'
|
||||
}
|
||||
}).$on('verified', (e) => {
|
||||
config.challenge.onSuccess(e.detail.payload, el);
|
||||
});
|
||||
});
|
||||
}};
|
||||
</script>
|
||||
#}
|
||||
<script>
|
||||
var flagALTCHAWidget = "{{ model.FLAG_ALTCHA_WIDGET }}";
|
||||
var idContactForm = "#{{ model.ID_CONTACT_FORM }}";
|
||||
|
||||
22
templates/pages/core/_contact_success.html
Normal file
22
templates/pages/core/_contact_success.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{% extends 'layouts/layout.html' %}
|
||||
|
||||
{% block page_head %}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='dist/css/core_contact.bundle.css') }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block page_nav_links %}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_body %}
|
||||
|
||||
{% set form = model.form_contact %}
|
||||
<section class="contact-section">
|
||||
<div class="contact-form">
|
||||
<h1>Message Received</h1>
|
||||
<p>Thanks for contacting us! We've received your message and will respond within 48 hours.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -3,10 +3,6 @@
|
||||
{% block title %}{{ model.title }}{% endblock %}
|
||||
|
||||
{% block page_body %}
|
||||
<!-- Include Stylesheet
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/sections/legal.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/pages/legal/accessibility_statement.css') }}">
|
||||
-->
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='dist/css/legal_accessibility_statement.bundle.css') }}">
|
||||
|
||||
<!-- HTML content -->
|
||||
@@ -201,10 +197,9 @@
|
||||
[Note: publishing the test report is optional but doing so may allow you to make your accessibility statement shorter and more focused.]
|
||||
https://www.w3.org/WAI/eval/report-tool/#/
|
||||
-->
|
||||
<p>You can read the full accessibility test report {{ model.URL_HOST }}{{ url_for('routes_legal.accessibility_report') }}.</p>
|
||||
<p>You can read the full accessibility test report {{ model.URL_HOST }}{{ model.HASH_PAGE_ACCESSIBILITY_REPORT }}.</p>
|
||||
</div>
|
||||
|
||||
<!-- Include JavaScript -->
|
||||
<script type="module" src="{{ url_for('static', filename='js/sections/legal.js') }}"></script>
|
||||
<script type="module" src="{{ url_for('static', filename='js/pages/legal/accessibility_statement.js') }}"></script>
|
||||
{% endblock %}
|
||||
@@ -1955,7 +1955,7 @@
|
||||
|
||||
<!--
|
||||
<script>
|
||||
var hashPageCurrent = "{{ model.HASH_PAGE_RETENTION_SCHEDULE }}";
|
||||
var hashPageCurrent = "{{ model.HASH_PAGE_DATA_RETENTION_SCHEDULE }}";
|
||||
|
||||
$(document).ready(function() {
|
||||
hookupPageRetentionSchedule();
|
||||
|
||||
Reference in New Issue
Block a user