E-mail
@@ -67,6 +67,9 @@
Password
+
diff --git a/components/account/account.js b/components/account/account.js
index 8faeb2f..fffc2de 100644
--- a/components/account/account.js
+++ b/components/account/account.js
@@ -9,6 +9,9 @@ $(document).ready( () => {
const updatePassword = pwdform.find('.update-password')
const register = component.find('.register')
const registerForm = component.find('.new-user-form')
+ const loginForm = component.find('.login-form')
+
+ if(loginForm.hasClass('error')) Apis.notification('ERRORE: Username o password errate.')
const orders = component.find('.order-row')
@@ -115,7 +118,6 @@ $(document).ready( () => {
})
const checkForm = () => {
- console.log('checkForm')
const inputs = component.find('.input')
const passwords = component.find('.input[type="password"]')
let errors = 0
diff --git a/components/account/account.scss b/components/account/account.scss
index d1ed124..356f333 100644
--- a/components/account/account.scss
+++ b/components/account/account.scss
@@ -37,6 +37,13 @@
padding: 15px 0 5px 0;
}
+ .errors {
+ display: block;
+ @include font-style($font-sans, 700, $font-16);
+ color: $red;
+ padding: 15px 0 5px 0;
+ }
+
.input {
&.error {
border: 1px solid $red;
diff --git a/components/breadcrumb/breadcrumb.html b/components/breadcrumb/breadcrumb.html
index b923115..f63c0b3 100644
--- a/components/breadcrumb/breadcrumb.html
+++ b/components/breadcrumb/breadcrumb.html
@@ -22,6 +22,9 @@
case 'account':
$levels[0] = array('account', '/account');
break;
+ case 'recupera-password':
+ $levels[0] = array('Recupera password', '/recupera-password');
+ break;
case 'checkout':
$levels[0] = array('checkout', '/checkout');
break;
diff --git a/components/passwordRecovery/passwordRecovery.html b/components/passwordRecovery/passwordRecovery.html
new file mode 100644
index 0000000..aec3ae0
--- /dev/null
+++ b/components/passwordRecovery/passwordRecovery.html
@@ -0,0 +1,80 @@
+
Ciao ".$user['first_name'].", ".
+ "ricevi questa mail perchè hai richiesto il reset della tua password su Iolovolio, di seguito troverai la tua nuova password temporanea, ti consigliamo di modificarla al primo accesso:
".
+ "Username: ".$user['email']." ".
+ "Nuova password: ".$new_password." ".
+ " | ";
+
+ $body .= "
Grazie, Servizio Clienti Iolovolio
|
";
+ $body .= emailFooter();
+
+
+ $sent = sendEmail($toEmail, $toName, $subject, $body, 'noreply');
+ if($sent === true) {
+ $message = "Password reimpostata correttamente!
+ Ti abbiamo inviato la nuova password provvisoria all'indirizzo ".trim($_POST['reset_usr']);
+ } else {
+ $message = "Erore invio mail!
+ Contatta l'assistenza";
+ }
+
+ } else {
+ $message = "ERRORE: L'indirizzo email inserito non è presente nel database!
Controlla l'indirizzo inserito e riprova.";
+ }
+ }
+
+?>
+
+
+
+
+
+ $message
";
+ }
+ ?>
+
+
+
+
+
Hai dimenticato la password?
+
Inserisci l'indirizzo email-con il quale ti sei registrato
+
+
+
+
+
+
+
+
diff --git a/components/passwordRecovery/passwordRecovery.js b/components/passwordRecovery/passwordRecovery.js
new file mode 100644
index 0000000..f8fff3f
--- /dev/null
+++ b/components/passwordRecovery/passwordRecovery.js
@@ -0,0 +1,5 @@
+
+$(document).ready( () => {
+ console.log('Load component - passwordRecovery')
+
+})
\ No newline at end of file
diff --git a/components/passwordRecovery/passwordRecovery.scss b/components/passwordRecovery/passwordRecovery.scss
new file mode 100644
index 0000000..cc15e2f
--- /dev/null
+++ b/components/passwordRecovery/passwordRecovery.scss
@@ -0,0 +1,60 @@
+@import "../../src/scss/variables.scss";
+@import "../../src/scss/mixins.scss";
+
+.component-passwordRecovery {
+ padding: 10px 0 40px 0;
+ min-height: 100vh;
+
+ .message {
+ color: $white;
+ background: $brown;
+ padding: 10px;
+ margin-bottom: 20px;
+ @include font-style($font-sans, 'regular', $font-12);
+ animation: blinker 2s linear 1;
+ }
+
+ .content {
+
+ .title {
+ display: block;
+ @include font-style($font-serif, 400, $font-32);
+ color: $black;
+ height: 50px;
+ }
+
+ .subtitle {
+ display: block;
+ @include font-style($font-sans, 700, $font-16);
+ color: $gray;
+ height: 40px;
+ }
+
+ .label {
+ display: block;
+ @include font-style($font-sans, 700, $font-16);
+ color: $gray;
+ padding: 15px 0 5px 0;
+ }
+
+ .errors {
+ display: block;
+ @include font-style($font-sans, 700, $font-16);
+ color: $red;
+ padding: 15px 0 5px 0;
+ }
+
+ .input {
+ max-width: 400px;
+ &.error {
+ border: 1px solid $red;
+ }
+ }
+
+ .submit {
+ @include font-style($font-serif, 700, $font-16);
+ }
+ }
+}
+
+
diff --git a/components/sectionHeader/sectionHeader.html b/components/sectionHeader/sectionHeader.html
index c5e6794..385a2a5 100644
--- a/components/sectionHeader/sectionHeader.html
+++ b/components/sectionHeader/sectionHeader.html
@@ -16,6 +16,9 @@
case 'account':
$section_label = 'account';
break;
+ case 'recupera-password':
+ $section_label = 'recupera password';
+ break;
case 'acquistare':
case 'carrello':
case 'checkout':
diff --git a/pages/recupera-password.ejs b/pages/recupera-password.ejs
new file mode 100644
index 0000000..1e1f914
--- /dev/null
+++ b/pages/recupera-password.ejs
@@ -0,0 +1,2 @@
+
+${require('../components/passwordRecovery/passwordRecovery.html')}
diff --git a/src/scss/main.scss b/src/scss/main.scss
index 7589adb..9a09b6e 100644
--- a/src/scss/main.scss
+++ b/src/scss/main.scss
@@ -25,3 +25,4 @@
@import "./components/checkout/checkout.scss";
@import "./components/thankyou/thankyou.scss";
@import "./components/account/account.scss";
+@import "./components/passwordRecovery/passwordRecovery.scss";