Merge pull request 'Removed contact form and added a documentaion subside' (#31) from sageTheDm/ai-virtual-assistant:main into main
Reviewed-on: https://interstellardevelopment.org/code/code/React-Group/ai-virtual-assistant/pulls/31
This commit is contained in:
commit
1da1927425
5 changed files with 18 additions and 44 deletions
|
@ -1,26 +0,0 @@
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
|
||||||
const contactForm = document.getElementById('contactForm');
|
|
||||||
|
|
||||||
if (contactForm) {
|
|
||||||
contactForm.addEventListener('submit', function(event) {
|
|
||||||
event.preventDefault(); // Prevent the form from submitting the traditional way
|
|
||||||
|
|
||||||
// Generate a random ticket number
|
|
||||||
const ticketNumber = Math.floor(Math.random() * 1000000); // Generates a random number between 0 and 999999
|
|
||||||
|
|
||||||
// Retrieve form values
|
|
||||||
const name = encodeURIComponent(document.getElementById('name').value);
|
|
||||||
const email = encodeURIComponent(document.getElementById('email').value);
|
|
||||||
const message = encodeURIComponent(document.getElementById('message').value);
|
|
||||||
|
|
||||||
// Construct the mailto link
|
|
||||||
const subject = `Support Ticket #${ticketNumber}`;
|
|
||||||
const body = `Name: ${name}%0AEmail: ${email}%0AMessage:%0A${message}`;
|
|
||||||
const mailtoLink = `mailto:example@example.com?subject=${subject}&body=${body}`;
|
|
||||||
|
|
||||||
// Open the default mail client
|
|
||||||
window.location.href = mailtoLink;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -17,7 +17,7 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/contact">Contact</a>
|
<a href="/documentation">Documentation</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/faq">FAQ</a>
|
<a href="/faq">FAQ</a>
|
|
@ -10,20 +10,20 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="/">
|
<a href="/">
|
||||||
<img src="/static/img/logo.png" alt="logo.png">
|
<img src="/static/img/logo.png" alt="logo.png">
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/contact">Contact</a>
|
<a href="/documentation">Documentation</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/faq">FAQ</a>
|
<a href="/faq">FAQ</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section id="faq">
|
<section id="faq">
|
||||||
<h2>Frequently Asked Questions</h2>
|
<h2>Frequently Asked Questions</h2>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/contact">Contact</a>
|
<a href="/documentation">Documentation</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/faq">FAQ</a>
|
<a href="/faq">FAQ</a>
|
||||||
|
|
|
@ -36,9 +36,9 @@ def faq():
|
||||||
return render_template('faq.html')
|
return render_template('faq.html')
|
||||||
|
|
||||||
|
|
||||||
@APP.route('/contact')
|
@APP.route('/documentation')
|
||||||
def contact():
|
def contact():
|
||||||
return render_template('contact.html')
|
return render_template('documentation.html')
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in a new issue