Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +7 -7
templates/index.html
CHANGED
@@ -176,9 +176,9 @@
|
|
176 |
function showLoginForm() {
|
177 |
document.getElementById('loginForm').style.display = 'block';
|
178 |
document.getElementById('registrationForm').style.display = 'none';
|
179 |
-
captureLoginEmail();
|
180 |
}
|
181 |
|
|
|
182 |
function captureLoginEmail() {
|
183 |
speak("Please say your email for login.", function () {
|
184 |
recognition.start();
|
@@ -226,8 +226,8 @@
|
|
226 |
let confirmation = event.results[0][0].transcript.trim().toLowerCase();
|
227 |
recognition.stop();
|
228 |
if (confirmation.includes("yes") || confirmation.includes("ok")) {
|
229 |
-
|
230 |
-
|
231 |
} else {
|
232 |
captureLoginMobile();
|
233 |
}
|
@@ -237,8 +237,8 @@
|
|
237 |
// Show the confirmation details to the user
|
238 |
function showConfirmationDetails() {
|
239 |
const name = document.getElementById('name').value;
|
240 |
-
const email = document.getElementById('
|
241 |
-
const phone = document.getElementById('
|
242 |
|
243 |
document.getElementById('confirmedName').textContent = "Name: " + name;
|
244 |
document.getElementById('confirmedEmail').textContent = "Email: " + email;
|
@@ -250,8 +250,8 @@
|
|
250 |
// Automatically submit to backend (Salesforce)
|
251 |
function submitDetails() {
|
252 |
const name = document.getElementById('name').value;
|
253 |
-
const email = document.getElementById('
|
254 |
-
const phone = document.getElementById('
|
255 |
|
256 |
// Send the details to your backend for Salesforce submission
|
257 |
fetch('/submit', {
|
|
|
176 |
function showLoginForm() {
|
177 |
document.getElementById('loginForm').style.display = 'block';
|
178 |
document.getElementById('registrationForm').style.display = 'none';
|
|
|
179 |
}
|
180 |
|
181 |
+
// Capture email and confirm for login
|
182 |
function captureLoginEmail() {
|
183 |
speak("Please say your email for login.", function () {
|
184 |
recognition.start();
|
|
|
226 |
let confirmation = event.results[0][0].transcript.trim().toLowerCase();
|
227 |
recognition.stop();
|
228 |
if (confirmation.includes("yes") || confirmation.includes("ok")) {
|
229 |
+
speak("Login successful!");
|
230 |
+
showSuccessMessage();
|
231 |
} else {
|
232 |
captureLoginMobile();
|
233 |
}
|
|
|
237 |
// Show the confirmation details to the user
|
238 |
function showConfirmationDetails() {
|
239 |
const name = document.getElementById('name').value;
|
240 |
+
const email = document.getElementById('email').value;
|
241 |
+
const phone = document.getElementById('mobile').value;
|
242 |
|
243 |
document.getElementById('confirmedName').textContent = "Name: " + name;
|
244 |
document.getElementById('confirmedEmail').textContent = "Email: " + email;
|
|
|
250 |
// Automatically submit to backend (Salesforce)
|
251 |
function submitDetails() {
|
252 |
const name = document.getElementById('name').value;
|
253 |
+
const email = document.getElementById('email').value;
|
254 |
+
const phone = document.getElementById('mobile').value;
|
255 |
|
256 |
// Send the details to your backend for Salesforce submission
|
257 |
fetch('/submit', {
|