Merge pull request #37 from Quantum-P3/feature/US-04
Add Reestablecer contraseña
This commit is contained in:
commit
18ca4042ce
|
@ -109,4 +109,10 @@ public class MailService {
|
|||
log.debug("Sending password reset email to '{}'", user.getEmail());
|
||||
sendEmailFromTemplate(user, "mail/passwordResetEmail", "email.reset.title");
|
||||
}
|
||||
|
||||
@Async
|
||||
public void sendPasswordRestoredMail(User user) {
|
||||
log.debug("Sending password restored email to '{}'", user.getEmail());
|
||||
sendEmailFromTemplate(user, "mail/passwordRestoredEmail", "email.restored.title");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -173,6 +173,7 @@ public class AccountResource {
|
|||
// Pretend the request has been successful to prevent checking which emails really exist
|
||||
// but log that an invalid attempt has been made
|
||||
log.warn("Password reset requested for non existing mail");
|
||||
throw new EmailNotExistException();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -192,6 +193,8 @@ public class AccountResource {
|
|||
|
||||
if (!user.isPresent()) {
|
||||
throw new AccountResourceException("No user was found for this reset key");
|
||||
} else {
|
||||
mailService.sendPasswordRestoredMail(user.get());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
package org.datasurvey.web.rest.errors;
|
||||
|
||||
public class EmailNotExistException extends BadRequestAlertException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public EmailNotExistException() {
|
||||
super(ErrorConstants.EMAIL_NOT_EXISTS_TYPE, "Email not exists!", "userManagement", "emailnotexists");
|
||||
}
|
||||
}
|
|
@ -12,6 +12,7 @@ public final class ErrorConstants {
|
|||
public static final URI INVALID_PASSWORD_TYPE = URI.create(PROBLEM_BASE_URL + "/invalid-password");
|
||||
public static final URI EMAIL_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/email-already-used");
|
||||
public static final URI LOGIN_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/login-already-used");
|
||||
public static final URI EMAIL_NOT_EXISTS_TYPE = URI.create(PROBLEM_BASE_URL + "/email-not-exists");
|
||||
|
||||
private ErrorConstants() {}
|
||||
}
|
||||
|
|
|
@ -19,3 +19,11 @@ email.reset.title=DataSurvey password reset
|
|||
email.reset.greeting=Dear {0}
|
||||
email.reset.text1=For your DataSurvey account a password reset was requested, please click on the URL below to reset it:
|
||||
email.reset.text2=Regards,
|
||||
|
||||
# Password Restored Mail
|
||||
email.restored.title=Your password was reset in DataSurvey
|
||||
email.restored.greeting=Hello, {0}!
|
||||
email.restored.text1=Your DataSurvey password has been successfully reset..
|
||||
email.restored.text2=Regards,
|
||||
email.restored.text3=If you did not make this change, please notify the following email immediately:
|
||||
email.restored.email=datasurvey@gmail.com
|
||||
|
|
|
@ -6,7 +6,7 @@ error.message=Mensaje:
|
|||
|
||||
# Activation email
|
||||
email.activation.title=Activación de DataSurvey
|
||||
email.activation.greeting=Estimado/a {0}
|
||||
email.activation.greeting=¡Hola, {0}!
|
||||
email.activation.text1=Su cuenta en DataSurvey ha sido creada. Por favor, haga clic en el siguiente enlace para activarla:
|
||||
email.activation.text2=Saludos,
|
||||
email.signature=Equipo de DataSurvey.
|
||||
|
@ -16,6 +16,15 @@ email.creation.text1=Su cuenta en DataSurvey ha sido creada. Por favor, haga cli
|
|||
|
||||
# Reset email
|
||||
email.reset.title=Reinicio de contraseña de DataSurvey
|
||||
email.reset.greeting=Estimado/a {0}
|
||||
email.reset.greeting=¡Hola, {0}!
|
||||
email.reset.text1=Se ha solicitado el reinicio de la contraseña para su cuenta en DataSurvey. Por favor, haga clic en el siguiente enlace para reiniciarla:
|
||||
email.reset.text2=Saludos,
|
||||
|
||||
# Password Restored Mail
|
||||
email.restored.title=Se restaleció su contraseña en DataSurvey
|
||||
email.restored.greeting=¡Hola, {0}!
|
||||
email.restored.text1=Se ha restablecido correctamente su contraseña en DataSurvey.
|
||||
email.restored.text2=Saludos,
|
||||
email.restored.text3=Si usted no realizó este cambio, favor notifique inmediatamente al siguiente correo:
|
||||
email.restored.email=datasurvey@gmail.com
|
||||
|
||||
|
|
|
@ -1,20 +1,327 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" th:lang="${#locale.language}" lang="en">
|
||||
<head>
|
||||
<title th:text="#{email.activation.title}">JHipster activation</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<!-- Forcing initial-scale shouldn't be necessary -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<!-- Use the latest (edge) version of IE rendering engine -->
|
||||
<meta name="x-apple-disable-message-reformatting" />
|
||||
<!-- Disable auto-scale in iOS 10 Mail entirely -->
|
||||
<title th:text="#{email.activation.title}">JHipster activation</title>
|
||||
<link rel="icon" th:href="@{|${baseUrl}/favicon.ico|}" />
|
||||
<link href="https://fonts.googleapis.com/css?family=NotoSansSP:300,400,700" rel="stylesheet" />
|
||||
<link rel="manifest" href="manifest.webapp" />
|
||||
<style>
|
||||
.bg_white {
|
||||
background: #ffffff;
|
||||
}
|
||||
.bg_light {
|
||||
background: #fafafa;
|
||||
}
|
||||
.bg_black {
|
||||
background: #000000;
|
||||
}
|
||||
.bg_dark {
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
.email-section {
|
||||
padding: 2.5em;
|
||||
}
|
||||
/*BUTTON*/
|
||||
.btn {
|
||||
padding: 10px 15px;
|
||||
display: inline-block;
|
||||
}
|
||||
.btn.btn-primary {
|
||||
border-radius: 5px;
|
||||
background: #007bff;
|
||||
color: #ffffff;
|
||||
}
|
||||
.btn.btn-white {
|
||||
border-radius: 5px;
|
||||
background: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
.btn.btn-white-outline {
|
||||
border-radius: 5px;
|
||||
background: transparent;
|
||||
border: 1px solid #fff;
|
||||
color: #fff;
|
||||
}
|
||||
.btn.btn-black-outline {
|
||||
border-radius: 0px;
|
||||
background: transparent;
|
||||
border: 2px solid #000;
|
||||
color: #000;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-family: 'Lato', sans-serif;
|
||||
color: #000000;
|
||||
margin-top: 0;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Noto Sans JP', sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 15px;
|
||||
line-height: 1.8;
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
a {
|
||||
color: #30e3ca;
|
||||
}
|
||||
|
||||
table {
|
||||
}
|
||||
/*LOGO*/
|
||||
|
||||
.logo h1 {
|
||||
margin: 0;
|
||||
}
|
||||
.logo h1 a {
|
||||
color: #30e3ca;
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
font-family: 'Lato', sans-serif;
|
||||
}
|
||||
|
||||
/*HERO*/
|
||||
.hero {
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.hero .text {
|
||||
color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.hero .text h2 {
|
||||
color: #000;
|
||||
font-size: 40px;
|
||||
margin-bottom: 0;
|
||||
font-weight: 400;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.hero .text h3 {
|
||||
font-size: 24px;
|
||||
font-weight: 300;
|
||||
}
|
||||
.hero .text h2 span {
|
||||
font-weight: 600;
|
||||
color: #30e3ca;
|
||||
}
|
||||
|
||||
/*HEADING SECTION*/
|
||||
.heading-section {
|
||||
}
|
||||
.heading-section h2 {
|
||||
color: #000000;
|
||||
font-size: 28px;
|
||||
margin-top: 0;
|
||||
line-height: 1.4;
|
||||
font-weight: 400;
|
||||
}
|
||||
.heading-section .subheading {
|
||||
margin-bottom: 20px !important;
|
||||
display: inline-block;
|
||||
font-size: 13px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 2px;
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
position: relative;
|
||||
}
|
||||
.heading-section .subheading::after {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: -10px;
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background: #30e3ca;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.heading-section-white {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
.heading-section-white h2 {
|
||||
/*font-family: ;*/
|
||||
line-height: 1;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.heading-section-white h2 {
|
||||
color: #ffffff;
|
||||
}
|
||||
.heading-section-white .subheading {
|
||||
margin-bottom: 0;
|
||||
display: inline-block;
|
||||
font-size: 13px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 2px;
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
ul.social {
|
||||
padding: 0;
|
||||
}
|
||||
ul.social li {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.footer .heading {
|
||||
color: #000;
|
||||
font-size: 20px;
|
||||
}
|
||||
.footer ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.footer ul li {
|
||||
list-style: none;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.footer ul li a {
|
||||
color: rgba(0, 0, 0, 1);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p th:text="#{email.activation.greeting(${user.login})}">Dear</p>
|
||||
<p th:text="#{email.activation.text1}">Your JHipster account has been created, please click on the URL below to activate it:</p>
|
||||
<p>
|
||||
<a th:with="url=(@{|${baseUrl}/account/activate?key=${user.activationKey}|})" th:href="${url}" th:text="${url}">Activation link</a>
|
||||
</p>
|
||||
<p>
|
||||
<span th:text="#{email.activation.text2}">Regards, </span>
|
||||
<br />
|
||||
<em th:text="#{email.signature}">JHipster.</em>
|
||||
</p>
|
||||
|
||||
<body width="100%" style="margin: 0; padding: 0 !important; mso-line-height-rule: exactly; background-color: #f1f1f1">
|
||||
<center style="width: 100%; background-color: #f1f1f1">
|
||||
<div
|
||||
style="
|
||||
display: none;
|
||||
font-size: 1px;
|
||||
max-height: 0px;
|
||||
max-width: 0px;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
mso-hide: all;
|
||||
font-family: sans-serif;
|
||||
"
|
||||
>
|
||||
‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌
|
||||
</div>
|
||||
<div style="max-width: 600px; margin: 0 auto" class="email-container">
|
||||
<!-- BEGIN BODY -->
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="margin: auto">
|
||||
<tr>
|
||||
<td valign="top" class="bg_white" style="padding: 1em 2.5em 0 2.5em">
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td class="logo" style="text-align: center">
|
||||
<h1>
|
||||
<a href="#"
|
||||
><img
|
||||
src="https://res.cloudinary.com/marielascloud/image/upload/v1626333881/DataSurveyLogo2_smr2ok.png"
|
||||
alt=""
|
||||
width="300"
|
||||
/></a>
|
||||
</h1>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- end tr -->
|
||||
<tr>
|
||||
<td valign="middle" class="hero bg_white" style="padding: 3em 0 2em 0">
|
||||
<img
|
||||
src="https://res.cloudinary.com/marielascloud/image/upload/v1626333882/email_v7pjtv.png"
|
||||
alt=""
|
||||
style="width: 300px; max-width: 600px; height: auto; margin: auto; display: block"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- end tr -->
|
||||
<tr>
|
||||
<td valign="middle" class="hero bg_white" style="padding: 2em 0 4em 0">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="text" style="padding: 0 2.5em; text-align: center">
|
||||
<h2 th:text="#{email.activation.greeting(${user.login})}">¡Hola!</h2>
|
||||
<h3 th:text="#{email.activation.text1}">
|
||||
Your JHipster account has been created, please click on the URL below to activate it:
|
||||
</h3>
|
||||
<p>
|
||||
<a
|
||||
th:with="url=(@{|${baseUrl}/account/activate?key=${user.activationKey}|})"
|
||||
th:href="${url}"
|
||||
class="btn btn-primary"
|
||||
>Activar cuenta</a
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
<div class="text" style="padding: 1em 2.5em; text-align: center">
|
||||
<p>
|
||||
<span th:text="#{email.activation.text2}">Regards, </span>
|
||||
<br />
|
||||
<em th:text="#{email.signature}">JHipster.</em>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- end tr -->
|
||||
<!-- 1 Column Text + Button : END -->
|
||||
</table>
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="margin: auto">
|
||||
<tr>
|
||||
<td valign="middle" class="bg_light footer email-section">
|
||||
<table>
|
||||
<tr>
|
||||
<td valign="top" width="33.333%" style="padding-top: 20px">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="text-align: left; padding-right: 10px">
|
||||
<h3 class="heading">Acerca de</h3>
|
||||
<p>DataSurvey es su compañero más cercano para poder recolectar información valiosa para usted.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td valign="top" width="33.333%" style="padding-top: 20px">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="text-align: left; padding-left: 5px; padding-right: 5px">
|
||||
<h3 class="heading">Información de contacto</h3>
|
||||
<ul>
|
||||
<li><span class="text">datasurvey@gmail.com</span></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- end: tr -->
|
||||
<tr>
|
||||
<td class="bg_light" style="text-align: center">
|
||||
<p><a href="https://datasurvey.org" style="color: rgba(0, 0, 0, 0.8)">DataSurvey.org</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,20 +1,327 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" th:lang="${#locale.language}" lang="en">
|
||||
<head>
|
||||
<title th:text="#{email.activation.title}">JHipster creation</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<!-- Forcing initial-scale shouldn't be necessary -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<!-- Use the latest (edge) version of IE rendering engine -->
|
||||
<meta name="x-apple-disable-message-reformatting" />
|
||||
<!-- Disable auto-scale in iOS 10 Mail entirely -->
|
||||
<title th:text="#{email.activation.title}">JHipster creation</title>
|
||||
<link rel="icon" th:href="@{|${baseUrl}/favicon.ico|}" />
|
||||
<link href="https://fonts.googleapis.com/css?family=NotoSansSP:300,400,700" rel="stylesheet" />
|
||||
<link rel="manifest" href="manifest.webapp" />
|
||||
<style>
|
||||
.bg_white {
|
||||
background: #ffffff;
|
||||
}
|
||||
.bg_light {
|
||||
background: #fafafa;
|
||||
}
|
||||
.bg_black {
|
||||
background: #000000;
|
||||
}
|
||||
.bg_dark {
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
.email-section {
|
||||
padding: 2.5em;
|
||||
}
|
||||
/*BUTTON*/
|
||||
.btn {
|
||||
padding: 10px 15px;
|
||||
display: inline-block;
|
||||
}
|
||||
.btn.btn-primary {
|
||||
border-radius: 5px;
|
||||
background: #007bff;
|
||||
color: #ffffff;
|
||||
}
|
||||
.btn.btn-white {
|
||||
border-radius: 5px;
|
||||
background: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
.btn.btn-white-outline {
|
||||
border-radius: 5px;
|
||||
background: transparent;
|
||||
border: 1px solid #fff;
|
||||
color: #fff;
|
||||
}
|
||||
.btn.btn-black-outline {
|
||||
border-radius: 0px;
|
||||
background: transparent;
|
||||
border: 2px solid #000;
|
||||
color: #000;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-family: 'Lato', sans-serif;
|
||||
color: #000000;
|
||||
margin-top: 0;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Noto Sans JP', sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 15px;
|
||||
line-height: 1.8;
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
a {
|
||||
color: #30e3ca;
|
||||
}
|
||||
|
||||
table {
|
||||
}
|
||||
/*LOGO*/
|
||||
|
||||
.logo h1 {
|
||||
margin: 0;
|
||||
}
|
||||
.logo h1 a {
|
||||
color: #30e3ca;
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
font-family: 'Lato', sans-serif;
|
||||
}
|
||||
|
||||
/*HERO*/
|
||||
.hero {
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.hero .text {
|
||||
color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.hero .text h2 {
|
||||
color: #000;
|
||||
font-size: 40px;
|
||||
margin-bottom: 0;
|
||||
font-weight: 400;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.hero .text h3 {
|
||||
font-size: 24px;
|
||||
font-weight: 300;
|
||||
}
|
||||
.hero .text h2 span {
|
||||
font-weight: 600;
|
||||
color: #30e3ca;
|
||||
}
|
||||
|
||||
/*HEADING SECTION*/
|
||||
.heading-section {
|
||||
}
|
||||
.heading-section h2 {
|
||||
color: #000000;
|
||||
font-size: 28px;
|
||||
margin-top: 0;
|
||||
line-height: 1.4;
|
||||
font-weight: 400;
|
||||
}
|
||||
.heading-section .subheading {
|
||||
margin-bottom: 20px !important;
|
||||
display: inline-block;
|
||||
font-size: 13px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 2px;
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
position: relative;
|
||||
}
|
||||
.heading-section .subheading::after {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: -10px;
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background: #30e3ca;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.heading-section-white {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
.heading-section-white h2 {
|
||||
/*font-family: ;*/
|
||||
line-height: 1;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.heading-section-white h2 {
|
||||
color: #ffffff;
|
||||
}
|
||||
.heading-section-white .subheading {
|
||||
margin-bottom: 0;
|
||||
display: inline-block;
|
||||
font-size: 13px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 2px;
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
ul.social {
|
||||
padding: 0;
|
||||
}
|
||||
ul.social li {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.footer .heading {
|
||||
color: #000;
|
||||
font-size: 20px;
|
||||
}
|
||||
.footer ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.footer ul li {
|
||||
list-style: none;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.footer ul li a {
|
||||
color: rgba(0, 0, 0, 1);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p th:text="#{email.activation.greeting(${user.login})}">Dear</p>
|
||||
<p th:text="#{email.creation.text1}">Your JHipster account has been created, please click on the URL below to access it:</p>
|
||||
<p>
|
||||
<a th:with="url=(@{|${baseUrl}/account/reset/finish?key=${user.resetKey}|})" th:href="${url}" th:text="${url}">Login link</a>
|
||||
</p>
|
||||
<p>
|
||||
<span th:text="#{email.activation.text2}">Regards, </span>
|
||||
<br />
|
||||
<em th:text="#{email.signature}">JHipster.</em>
|
||||
</p>
|
||||
|
||||
<body width="100%" style="margin: 0; padding: 0 !important; mso-line-height-rule: exactly; background-color: #f1f1f1">
|
||||
<center style="width: 100%; background-color: #f1f1f1">
|
||||
<div
|
||||
style="
|
||||
display: none;
|
||||
font-size: 1px;
|
||||
max-height: 0px;
|
||||
max-width: 0px;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
mso-hide: all;
|
||||
font-family: sans-serif;
|
||||
"
|
||||
>
|
||||
‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌
|
||||
</div>
|
||||
<div style="max-width: 600px; margin: 0 auto" class="email-container">
|
||||
<!-- BEGIN BODY -->
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="margin: auto">
|
||||
<tr>
|
||||
<td valign="top" class="bg_white" style="padding: 1em 2.5em 0 2.5em">
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td class="logo" style="text-align: center">
|
||||
<h1>
|
||||
<a href="#"
|
||||
><img
|
||||
src="https://res.cloudinary.com/marielascloud/image/upload/v1626333881/DataSurveyLogo2_smr2ok.png"
|
||||
alt=""
|
||||
width="300"
|
||||
/></a>
|
||||
</h1>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- end tr -->
|
||||
<tr>
|
||||
<td valign="middle" class="hero bg_white" style="padding: 3em 0 2em 0">
|
||||
<img
|
||||
src="https://res.cloudinary.com/marielascloud/image/upload/v1626333882/email_v7pjtv.png"
|
||||
alt=""
|
||||
style="width: 300px; max-width: 600px; height: auto; margin: auto; display: block"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- end tr -->
|
||||
<tr>
|
||||
<td valign="middle" class="hero bg_white" style="padding: 2em 0 4em 0">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="text" style="padding: 0 2.5em; text-align: center">
|
||||
<h2 th:text="#{email.activation.greeting(${user.login})}">¡Hola!</h2>
|
||||
<h3 th:text="#{email.creation.text1}">
|
||||
Your JHipster account has been created, please click on the URL below to access it:
|
||||
</h3>
|
||||
<p>
|
||||
<a
|
||||
th:with="url=(@{|${baseUrl}/account/reset/finish?key=${user.resetKey}|})"
|
||||
th:href="${url}"
|
||||
class="btn btn-primary"
|
||||
>Iniciar sesión</a
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
<div class="text" style="padding: 1em 2.5em; text-align: center">
|
||||
<p>
|
||||
<span th:text="#{email.activation.text2}">Regards, </span>
|
||||
<br />
|
||||
<em th:text="#{email.signature}">JHipster.</em>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- end tr -->
|
||||
<!-- 1 Column Text + Button : END -->
|
||||
</table>
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="margin: auto">
|
||||
<tr>
|
||||
<td valign="middle" class="bg_light footer email-section">
|
||||
<table>
|
||||
<tr>
|
||||
<td valign="top" width="33.333%" style="padding-top: 20px">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="text-align: left; padding-right: 10px">
|
||||
<h3 class="heading">Acerca de</h3>
|
||||
<p>DataSurvey es su compañero más cercano para poder recolectar información valiosa para usted.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td valign="top" width="33.333%" style="padding-top: 20px">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="text-align: left; padding-left: 5px; padding-right: 5px">
|
||||
<h3 class="heading">Información de contacto</h3>
|
||||
<ul>
|
||||
<li><span class="text">datasurvey@gmail.com</span></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- end: tr -->
|
||||
<tr>
|
||||
<td class="bg_light" style="text-align: center">
|
||||
<p><a href="https://datasurvey.org" style="color: rgba(0, 0, 0, 0.8)">DataSurvey.org</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,22 +1,327 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" th:lang="${#locale.language}" lang="en">
|
||||
<head>
|
||||
<title th:text="#{email.reset.title}">JHipster password reset</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<!-- Forcing initial-scale shouldn't be necessary -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<!-- Use the latest (edge) version of IE rendering engine -->
|
||||
<meta name="x-apple-disable-message-reformatting" />
|
||||
<!-- Disable auto-scale in iOS 10 Mail entirely -->
|
||||
<title th:text="#{email.reset.title}">JHipster password reset</title>
|
||||
<link rel="icon" th:href="@{|${baseUrl}/favicon.ico|}" />
|
||||
<link href="https://fonts.googleapis.com/css?family=NotoSansSP:300,400,700" rel="stylesheet" />
|
||||
<link rel="manifest" href="manifest.webapp" />
|
||||
<style>
|
||||
.bg_white {
|
||||
background: #ffffff;
|
||||
}
|
||||
.bg_light {
|
||||
background: #fafafa;
|
||||
}
|
||||
.bg_black {
|
||||
background: #000000;
|
||||
}
|
||||
.bg_dark {
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
.email-section {
|
||||
padding: 2.5em;
|
||||
}
|
||||
/*BUTTON*/
|
||||
.btn {
|
||||
padding: 10px 15px;
|
||||
display: inline-block;
|
||||
}
|
||||
.btn.btn-primary {
|
||||
border-radius: 5px;
|
||||
background: #007bff;
|
||||
color: #ffffff;
|
||||
}
|
||||
.btn.btn-white {
|
||||
border-radius: 5px;
|
||||
background: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
.btn.btn-white-outline {
|
||||
border-radius: 5px;
|
||||
background: transparent;
|
||||
border: 1px solid #fff;
|
||||
color: #fff;
|
||||
}
|
||||
.btn.btn-black-outline {
|
||||
border-radius: 0px;
|
||||
background: transparent;
|
||||
border: 2px solid #000;
|
||||
color: #000;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-family: 'Lato', sans-serif;
|
||||
color: #000000;
|
||||
margin-top: 0;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Noto Sans JP', sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 15px;
|
||||
line-height: 1.8;
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
a {
|
||||
color: #30e3ca;
|
||||
}
|
||||
|
||||
table {
|
||||
}
|
||||
/*LOGO*/
|
||||
|
||||
.logo h1 {
|
||||
margin: 0;
|
||||
}
|
||||
.logo h1 a {
|
||||
color: #30e3ca;
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
font-family: 'Lato', sans-serif;
|
||||
}
|
||||
|
||||
/*HERO*/
|
||||
.hero {
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.hero .text {
|
||||
color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.hero .text h2 {
|
||||
color: #000;
|
||||
font-size: 40px;
|
||||
margin-bottom: 0;
|
||||
font-weight: 400;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.hero .text h3 {
|
||||
font-size: 24px;
|
||||
font-weight: 300;
|
||||
}
|
||||
.hero .text h2 span {
|
||||
font-weight: 600;
|
||||
color: #30e3ca;
|
||||
}
|
||||
|
||||
/*HEADING SECTION*/
|
||||
.heading-section {
|
||||
}
|
||||
.heading-section h2 {
|
||||
color: #000000;
|
||||
font-size: 28px;
|
||||
margin-top: 0;
|
||||
line-height: 1.4;
|
||||
font-weight: 400;
|
||||
}
|
||||
.heading-section .subheading {
|
||||
margin-bottom: 20px !important;
|
||||
display: inline-block;
|
||||
font-size: 13px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 2px;
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
position: relative;
|
||||
}
|
||||
.heading-section .subheading::after {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: -10px;
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background: #30e3ca;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.heading-section-white {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
.heading-section-white h2 {
|
||||
/*font-family: ;*/
|
||||
line-height: 1;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.heading-section-white h2 {
|
||||
color: #ffffff;
|
||||
}
|
||||
.heading-section-white .subheading {
|
||||
margin-bottom: 0;
|
||||
display: inline-block;
|
||||
font-size: 13px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 2px;
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
ul.social {
|
||||
padding: 0;
|
||||
}
|
||||
ul.social li {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.footer .heading {
|
||||
color: #000;
|
||||
font-size: 20px;
|
||||
}
|
||||
.footer ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.footer ul li {
|
||||
list-style: none;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.footer ul li a {
|
||||
color: rgba(0, 0, 0, 1);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p th:text="#{email.reset.greeting(${user.login})}">Dear</p>
|
||||
<p th:text="#{email.reset.text1}">
|
||||
For your JHipster account a password reset was requested, please click on the URL below to reset it:
|
||||
</p>
|
||||
<p>
|
||||
<a th:with="url=(@{|${baseUrl}/account/reset/finish?key=${user.resetKey}|})" th:href="${url}" th:text="${url}">Login link</a>
|
||||
</p>
|
||||
<p>
|
||||
<span th:text="#{email.reset.text2}">Regards, </span>
|
||||
<br />
|
||||
<em th:text="#{email.signature}">JHipster.</em>
|
||||
</p>
|
||||
|
||||
<body width="100%" style="margin: 0; padding: 0 !important; mso-line-height-rule: exactly; background-color: #f1f1f1">
|
||||
<center style="width: 100%; background-color: #f1f1f1">
|
||||
<div
|
||||
style="
|
||||
display: none;
|
||||
font-size: 1px;
|
||||
max-height: 0px;
|
||||
max-width: 0px;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
mso-hide: all;
|
||||
font-family: sans-serif;
|
||||
"
|
||||
>
|
||||
‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌
|
||||
</div>
|
||||
<div style="max-width: 600px; margin: 0 auto" class="email-container">
|
||||
<!-- BEGIN BODY -->
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="margin: auto">
|
||||
<tr>
|
||||
<td valign="top" class="bg_white" style="padding: 1em 2.5em 0 2.5em">
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td class="logo" style="text-align: center">
|
||||
<h1>
|
||||
<a href="#"
|
||||
><img
|
||||
src="https://res.cloudinary.com/marielascloud/image/upload/v1626333881/DataSurveyLogo2_smr2ok.png"
|
||||
alt=""
|
||||
width="300"
|
||||
/></a>
|
||||
</h1>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- end tr -->
|
||||
<tr>
|
||||
<td valign="middle" class="hero bg_white" style="padding: 3em 0 2em 0">
|
||||
<img
|
||||
src="https://res.cloudinary.com/marielascloud/image/upload/v1626333882/email_v7pjtv.png"
|
||||
alt=""
|
||||
style="width: 300px; max-width: 600px; height: auto; margin: auto; display: block"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- end tr -->
|
||||
<tr>
|
||||
<td valign="middle" class="hero bg_white" style="padding: 2em 0 4em 0">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="text" style="padding: 0 2.5em; text-align: center">
|
||||
<h2 th:text="#{email.reset.greeting(${user.login})}">¡Hola!</h2>
|
||||
<h3 th:text="#{email.reset.text1}">
|
||||
For your JHipster account a password reset was requested, please click on the URL below to reset it:
|
||||
</h3>
|
||||
<p>
|
||||
<a
|
||||
th:with="url=(@{|${baseUrl}/account/reset/finish?key=${user.resetKey}|})"
|
||||
th:href="${url}"
|
||||
class="btn btn-primary"
|
||||
>Restablecer contraseña</a
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
<div class="text" style="padding: 1em 2.5em; text-align: center">
|
||||
<p>
|
||||
<span th:text="#{email.reset.text2}">Regards, </span>
|
||||
<br />
|
||||
<em th:text="#{email.signature}">JHipster.</em>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- end tr -->
|
||||
<!-- 1 Column Text + Button : END -->
|
||||
</table>
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="margin: auto">
|
||||
<tr>
|
||||
<td valign="middle" class="bg_light footer email-section">
|
||||
<table>
|
||||
<tr>
|
||||
<td valign="top" width="33.333%" style="padding-top: 20px">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="text-align: left; padding-right: 10px">
|
||||
<h3 class="heading">Acerca de</h3>
|
||||
<p>DataSurvey es su compañero más cercano para poder recolectar información valiosa para usted.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td valign="top" width="33.333%" style="padding-top: 20px">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="text-align: left; padding-left: 5px; padding-right: 5px">
|
||||
<h3 class="heading">Información de contacto</h3>
|
||||
<ul>
|
||||
<li><span class="text">datasurvey@gmail.com</span></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- end: tr -->
|
||||
<tr>
|
||||
<td class="bg_light" style="text-align: center">
|
||||
<p><a href="https://datasurvey.org" style="color: rgba(0, 0, 0, 0.8)">DataSurvey.org</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,329 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" th:lang="${#locale.language}" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<!-- Forcing initial-scale shouldn't be necessary -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<!-- Use the latest (edge) version of IE rendering engine -->
|
||||
<meta name="x-apple-disable-message-reformatting" />
|
||||
<!-- Disable auto-scale in iOS 10 Mail entirely -->
|
||||
<title th:text="#{email.restored.title}">JHipster password restored</title>
|
||||
<link rel="icon" th:href="@{|${baseUrl}/favicon.ico|}" />
|
||||
<link href="https://fonts.googleapis.com/css?family=NotoSansSP:300,400,700" rel="stylesheet" />
|
||||
<link rel="manifest" href="manifest.webapp" />
|
||||
<style>
|
||||
.bg_white {
|
||||
background: #ffffff;
|
||||
}
|
||||
.bg_light {
|
||||
background: #fafafa;
|
||||
}
|
||||
.bg_black {
|
||||
background: #000000;
|
||||
}
|
||||
.bg_dark {
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
.email-section {
|
||||
padding: 2.5em;
|
||||
}
|
||||
/*BUTTON*/
|
||||
.btn {
|
||||
padding: 10px 15px;
|
||||
display: inline-block;
|
||||
}
|
||||
.btn.btn-primary {
|
||||
border-radius: 5px;
|
||||
background: #007bff;
|
||||
color: #ffffff;
|
||||
}
|
||||
.btn.btn-white {
|
||||
border-radius: 5px;
|
||||
background: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
.btn.btn-white-outline {
|
||||
border-radius: 5px;
|
||||
background: transparent;
|
||||
border: 1px solid #fff;
|
||||
color: #fff;
|
||||
}
|
||||
.btn.btn-black-outline {
|
||||
border-radius: 0px;
|
||||
background: transparent;
|
||||
border: 2px solid #000;
|
||||
color: #000;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-family: 'Lato', sans-serif;
|
||||
color: #000000;
|
||||
margin-top: 0;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Noto Sans JP', sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 15px;
|
||||
line-height: 1.8;
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
a {
|
||||
color: #30e3ca;
|
||||
}
|
||||
|
||||
table {
|
||||
}
|
||||
/*LOGO*/
|
||||
|
||||
.logo h1 {
|
||||
margin: 0;
|
||||
}
|
||||
.logo h1 a {
|
||||
color: #30e3ca;
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
font-family: 'Lato', sans-serif;
|
||||
}
|
||||
|
||||
/*HERO*/
|
||||
.hero {
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.hero .text {
|
||||
color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.hero .text h2 {
|
||||
color: #000;
|
||||
font-size: 40px;
|
||||
margin-bottom: 0;
|
||||
font-weight: 400;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.hero .text h3 {
|
||||
font-size: 24px;
|
||||
font-weight: 300;
|
||||
}
|
||||
.hero .text h2 span {
|
||||
font-weight: 600;
|
||||
color: #30e3ca;
|
||||
}
|
||||
|
||||
/*HEADING SECTION*/
|
||||
.heading-section {
|
||||
}
|
||||
.heading-section h2 {
|
||||
color: #000000;
|
||||
font-size: 28px;
|
||||
margin-top: 0;
|
||||
line-height: 1.4;
|
||||
font-weight: 400;
|
||||
}
|
||||
.heading-section .subheading {
|
||||
margin-bottom: 20px !important;
|
||||
display: inline-block;
|
||||
font-size: 13px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 2px;
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
position: relative;
|
||||
}
|
||||
.heading-section .subheading::after {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: -10px;
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background: #30e3ca;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.heading-section-white {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
.heading-section-white h2 {
|
||||
/*font-family: ;*/
|
||||
line-height: 1;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.heading-section-white h2 {
|
||||
color: #ffffff;
|
||||
}
|
||||
.heading-section-white .subheading {
|
||||
margin-bottom: 0;
|
||||
display: inline-block;
|
||||
font-size: 13px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 2px;
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
ul.social {
|
||||
padding: 0;
|
||||
}
|
||||
ul.social li {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.footer .heading {
|
||||
color: #000;
|
||||
font-size: 20px;
|
||||
}
|
||||
.footer ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.footer ul li {
|
||||
list-style: none;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.footer ul li a {
|
||||
color: rgba(0, 0, 0, 1);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body width="100%" style="margin: 0; padding: 0 !important; mso-line-height-rule: exactly; background-color: #f1f1f1">
|
||||
<center style="width: 100%; background-color: #f1f1f1">
|
||||
<div
|
||||
style="
|
||||
display: none;
|
||||
font-size: 1px;
|
||||
max-height: 0px;
|
||||
max-width: 0px;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
mso-hide: all;
|
||||
font-family: sans-serif;
|
||||
"
|
||||
>
|
||||
‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌
|
||||
</div>
|
||||
<div style="max-width: 600px; margin: 0 auto" class="email-container">
|
||||
<!-- BEGIN BODY -->
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="margin: auto">
|
||||
<tr>
|
||||
<td valign="top" class="bg_white" style="padding: 1em 2.5em 0 2.5em">
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td class="logo" style="text-align: center">
|
||||
<h1>
|
||||
<a href="#"
|
||||
><img
|
||||
src="https://res.cloudinary.com/marielascloud/image/upload/v1626333881/DataSurveyLogo2_smr2ok.png"
|
||||
alt=""
|
||||
width="300"
|
||||
/></a>
|
||||
</h1>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- end tr -->
|
||||
<tr>
|
||||
<td valign="middle" class="hero bg_white" style="padding: 3em 0 2em 0">
|
||||
<img
|
||||
src="https://res.cloudinary.com/marielascloud/image/upload/v1626333882/email_v7pjtv.png"
|
||||
alt=""
|
||||
style="width: 300px; max-width: 600px; height: auto; margin: auto; display: block"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- end tr -->
|
||||
<tr>
|
||||
<td valign="middle" class="hero bg_white" style="padding: 2em 0 4em 0">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="text" style="padding: 0 2.5em; text-align: center">
|
||||
<h2 th:text="#{email.restored.greeting(${user.login})}">Hello!</h2>
|
||||
<h3 th:text="#{email.restored.text1}">For your JHipster account a password has been successfully reset</h3>
|
||||
<p style="cursor: pointer">
|
||||
<a th:with="url=(@{|${baseUrl}/login|})" th:href="${url}" class="btn btn-primary">Iniciar Sesión</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="text" style="padding: 1em 2.5em; text-align: center">
|
||||
<p>
|
||||
<span th:text="#{email.restored.text3}"
|
||||
>If you did not make this change, please notify the following email immediately</span
|
||||
>
|
||||
|
||||
<a th:href="#{'mailto:'+email.restored.email}" th:text="#{email.restored.email}">datasurvey@gmail.com</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="text" style="padding: 0.2em 2.5em 0.5em; text-align: center">
|
||||
<p>
|
||||
<span th:text="#{email.restored.text2}">Regards, </span>
|
||||
<br />
|
||||
<em th:text="#{email.signature}">JHipster.</em>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- end tr -->
|
||||
<!-- 1 Column Text + Button : END -->
|
||||
</table>
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="margin: auto">
|
||||
<tr>
|
||||
<td valign="middle" class="bg_light footer email-section">
|
||||
<table>
|
||||
<tr>
|
||||
<td valign="top" width="33.333%" style="padding-top: 20px">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="text-align: left; padding-right: 10px">
|
||||
<h3 class="heading">Acerca de</h3>
|
||||
<p>DataSurvey es su compañero más cercano para poder recolectar información valiosa para usted.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td valign="top" width="33.333%" style="padding-top: 20px">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="text-align: left; padding-left: 5px; padding-right: 5px">
|
||||
<h3 class="heading">Información de contacto</h3>
|
||||
<ul>
|
||||
<li><span class="text">datasurvey@gmail.com</span></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- end: tr -->
|
||||
<tr>
|
||||
<td class="bg_light" style="text-align: center">
|
||||
<p><a href="https://datasurvey.org" style="color: rgba(0, 0, 0, 0.8)">DataSurvey.org</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
|
@ -1,137 +1,172 @@
|
|||
<div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-4">
|
||||
<h1 jhiTranslate="reset.finish.title">Reset password</h1>
|
||||
|
||||
<div class="alert alert-danger" jhiTranslate="reset.finish.messages.keymissing" *ngIf="initialized && !key">
|
||||
<strong>The password reset key is missing.</strong>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-warning" *ngIf="key && !success">
|
||||
<span jhiTranslate="reset.finish.messages.info">Choose a new password</span>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-danger" *ngIf="error">
|
||||
<span jhiTranslate="reset.finish.messages.error"
|
||||
>Your password couldn't be reset. Remember a password request is only valid for 24 hours.</span
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-success" *ngIf="success">
|
||||
<span jhiTranslate="reset.finish.messages.success"><strong>Your password has been reset.</strong> Please </span>
|
||||
<a class="alert-link" routerLink="/login" jhiTranslate="global.messages.info.authenticated.link">sign in</a>.
|
||||
</div>
|
||||
|
||||
<div class="alert alert-danger" *ngIf="doNotMatch" jhiTranslate="global.messages.error.dontmatch">
|
||||
The password and its confirmation do not match!
|
||||
</div>
|
||||
|
||||
<div *ngIf="key && !success">
|
||||
<form name="form" role="form" (ngSubmit)="finishReset()" [formGroup]="passwordForm">
|
||||
<div class="form-group">
|
||||
<label class="form-control-label" for="newPassword" jhiTranslate="global.form.newpassword.label">New password</label>
|
||||
<input
|
||||
type="password"
|
||||
class="form-control"
|
||||
id="newPassword"
|
||||
name="newPassword"
|
||||
placeholder="{{ 'global.form.newpassword.placeholder' | translate }}"
|
||||
formControlName="newPassword"
|
||||
data-cy="resetPassword"
|
||||
#newPassword
|
||||
/>
|
||||
|
||||
<div
|
||||
*ngIf="
|
||||
passwordForm.get('newPassword')!.invalid &&
|
||||
(passwordForm.get('newPassword')!.dirty || passwordForm.get('newPassword')!.touched)
|
||||
"
|
||||
>
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="passwordForm.get('newPassword')?.errors?.required"
|
||||
jhiTranslate="global.messages.validate.newpassword.required"
|
||||
>
|
||||
Your password is required.
|
||||
</small>
|
||||
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="passwordForm.get('newPassword')?.errors?.minlength"
|
||||
jhiTranslate="global.messages.validate.newpassword.minlength"
|
||||
>
|
||||
Your password is required to be at least 4 characters.
|
||||
</small>
|
||||
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="passwordForm.get('newPassword')?.errors?.maxlength"
|
||||
jhiTranslate="global.messages.validate.newpassword.maxlength"
|
||||
>
|
||||
Your password cannot be longer than 50 characters.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<jhi-password-strength-bar [passwordToCheck]="passwordForm.get('newPassword')!.value"></jhi-password-strength-bar>
|
||||
<div class="account-pages pt-2 pt-sm-5 pb-4 pb-sm-5" style="height: 100vh; background-color: #f1f5f9">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-xxl-4 col-lg-5">
|
||||
<div class="card mt-5">
|
||||
<!-- Logo -->
|
||||
<div class="pl-4 pt-4 pr-4 pb-1 text-center">
|
||||
<img src="../../content/img_datasurvey/datasurvey-logo-text-black.svg" alt="" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-control-label" for="confirmPassword" jhiTranslate="global.form.confirmpassword.label"
|
||||
>New password confirmation</label
|
||||
>
|
||||
<input
|
||||
type="password"
|
||||
class="form-control"
|
||||
id="confirmPassword"
|
||||
name="confirmPassword"
|
||||
placeholder="{{ 'global.form.confirmpassword.placeholder' | translate }}"
|
||||
formControlName="confirmPassword"
|
||||
data-cy="confirmResetPassword"
|
||||
/>
|
||||
|
||||
<div
|
||||
*ngIf="
|
||||
passwordForm.get('confirmPassword')!.invalid &&
|
||||
(passwordForm.get('confirmPassword')!.dirty || passwordForm.get('confirmPassword')!.touched)
|
||||
"
|
||||
>
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="passwordForm.get('confirmPassword')?.errors?.required"
|
||||
jhiTranslate="global.messages.validate.confirmpassword.required"
|
||||
<div class="card-body p-4">
|
||||
<div class="text-center w-75 m-auto">
|
||||
<h4
|
||||
class="text-dark-50 text-center pb-0 fw-bold p-0 m-0"
|
||||
style="color: #727070; font-weight: 700; font-size: 1.3rem"
|
||||
jhiTranslate="reset.finish.title"
|
||||
>
|
||||
Your password confirmation is required.
|
||||
</small>
|
||||
Reset password
|
||||
</h4>
|
||||
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="passwordForm.get('confirmPassword')?.errors?.minlength"
|
||||
jhiTranslate="global.messages.validate.confirmpassword.minlength"
|
||||
>
|
||||
Your password confirmation is required to be at least 4 characters.
|
||||
</small>
|
||||
<p class="mb-4" style="color: rgba(146, 146, 146, 0.664)" *ngIf="key && !success" jhiTranslate="reset.finish.messages.info">
|
||||
Choose a new password
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<div class="alert alert-danger" jhiTranslate="reset.finish.messages.keymissing" *ngIf="initialized && !key">
|
||||
<strong>The password reset key is missing.</strong>
|
||||
</div>
|
||||
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="passwordForm.get('confirmPassword')?.errors?.maxlength"
|
||||
jhiTranslate="global.messages.validate.confirmpassword.maxlength"
|
||||
>
|
||||
Your password confirmation cannot be longer than 50 characters.
|
||||
</small>
|
||||
<div class="alert alert-danger" *ngIf="error">
|
||||
<span jhiTranslate="reset.finish.messages.error"
|
||||
>Your password couldn't be reset. Remember a password request is only valid for 24 hours.</span
|
||||
>
|
||||
</div>
|
||||
<div *ngIf="success">
|
||||
<div class="alert alert-success text-center my-2">
|
||||
<span jhiTranslate="reset.finish.messages.success"><strong>Your password has been reset.</strong></span>
|
||||
<strong><span jhiTranslate="global.messages.info.authenticated.link">sign in</span></strong>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center">
|
||||
<button class="ds-btn ds-btn--primary" routerLink="/login" jhiTranslate="global.messages.info.authenticated.botonInicio">
|
||||
sign in</button
|
||||
>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-danger" *ngIf="doNotMatch" jhiTranslate="global.messages.error.dontmatch">
|
||||
The password and its confirmation do not match!
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="key && !success">
|
||||
<form name="form" class="ds-form" role="form" (ngSubmit)="finishReset()" [formGroup]="passwordForm">
|
||||
<div class="form-group">
|
||||
<label class="form-control-label" for="newPassword" jhiTranslate="global.form.newpassword.label">New password</label>
|
||||
<input
|
||||
type="password"
|
||||
class="form-control"
|
||||
id="newPassword"
|
||||
name="newPassword"
|
||||
placeholder="{{ 'global.form.newpassword.placeholder' | translate }}"
|
||||
formControlName="newPassword"
|
||||
data-cy="resetPassword"
|
||||
#newPassword
|
||||
/>
|
||||
|
||||
<div
|
||||
*ngIf="
|
||||
passwordForm.get('newPassword')!.invalid &&
|
||||
(passwordForm.get('newPassword')!.dirty || passwordForm.get('newPassword')!.touched)
|
||||
"
|
||||
>
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="passwordForm.get('newPassword')?.errors?.required"
|
||||
jhiTranslate="global.messages.validate.newpassword.required"
|
||||
>
|
||||
Your password is required.
|
||||
</small>
|
||||
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="passwordForm.get('newPassword')?.errors?.minlength"
|
||||
jhiTranslate="global.messages.validate.newpassword.minlength"
|
||||
>
|
||||
Your password is required to be at least 8 characters.
|
||||
</small>
|
||||
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="passwordForm.get('newPassword')?.errors?.maxlength"
|
||||
jhiTranslate="global.messages.validate.newpassword.maxlength"
|
||||
>
|
||||
Your password cannot be longer than 50 characters.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!--<jhi-password-strength-bar [passwordToCheck]="passwordForm.get('newPassword')!.value"></jhi-password-strength-bar>-->
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-control-label" for="confirmPassword" jhiTranslate="global.form.confirmpassword.label"
|
||||
>New password confirmation</label
|
||||
>
|
||||
<input
|
||||
type="password"
|
||||
class="form-control"
|
||||
id="confirmPassword"
|
||||
name="confirmPassword"
|
||||
placeholder="{{ 'global.form.confirmpassword.placeholder' | translate }}"
|
||||
formControlName="confirmPassword"
|
||||
data-cy="confirmResetPassword"
|
||||
/>
|
||||
|
||||
<div
|
||||
*ngIf="
|
||||
passwordForm.get('confirmPassword')!.invalid &&
|
||||
(passwordForm.get('confirmPassword')!.dirty || passwordForm.get('confirmPassword')!.touched)
|
||||
"
|
||||
>
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="passwordForm.get('confirmPassword')?.errors?.required"
|
||||
jhiTranslate="global.messages.validate.confirmpassword.required"
|
||||
>
|
||||
Your password confirmation is required.
|
||||
</small>
|
||||
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="passwordForm.get('confirmPassword')?.errors?.minlength"
|
||||
jhiTranslate="global.messages.validate.confirmpassword.minlength"
|
||||
>
|
||||
Your password confirmation is required to be at least 8 characters.
|
||||
</small>
|
||||
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="passwordForm.get('confirmPassword')?.errors?.maxlength"
|
||||
jhiTranslate="global.messages.validate.confirmpassword.maxlength"
|
||||
>
|
||||
Your password confirmation cannot be longer than 50 characters.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<button
|
||||
type="submit"
|
||||
[disabled]="passwordForm.invalid"
|
||||
class="ds-btn ds-btn--primary"
|
||||
jhiTranslate="reset.finish.form.button"
|
||||
data-cy="submit"
|
||||
>
|
||||
Reset Password
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card-body -->
|
||||
</div>
|
||||
<!-- end card -->
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
[disabled]="passwordForm.invalid"
|
||||
class="btn btn-primary"
|
||||
jhiTranslate="reset.finish.form.button"
|
||||
data-cy="submit"
|
||||
>
|
||||
Reset Password
|
||||
</button>
|
||||
</form>
|
||||
<!-- end row -->
|
||||
</div>
|
||||
<!-- end col -->
|
||||
</div>
|
||||
<!-- end row -->
|
||||
</div>
|
||||
<!-- end container -->
|
||||
</div>
|
||||
<!-- end page -->
|
||||
|
|
|
@ -19,8 +19,8 @@ export class PasswordResetFinishComponent implements OnInit, AfterViewInit {
|
|||
key = '';
|
||||
|
||||
passwordForm = this.fb.group({
|
||||
newPassword: ['', [Validators.required, Validators.minLength(4), Validators.maxLength(50)]],
|
||||
confirmPassword: ['', [Validators.required, Validators.minLength(4), Validators.maxLength(50)]],
|
||||
newPassword: ['', [Validators.required, Validators.minLength(8), Validators.maxLength(50)]],
|
||||
confirmPassword: ['', [Validators.required, Validators.minLength(8), Validators.maxLength(50)]],
|
||||
});
|
||||
|
||||
constructor(private passwordResetFinishService: PasswordResetFinishService, private route: ActivatedRoute, private fb: FormBuilder) {}
|
||||
|
|
|
@ -1,81 +1,132 @@
|
|||
<div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<h1 jhiTranslate="reset.request.title">Reset your password</h1>
|
||||
|
||||
<jhi-alert-error></jhi-alert-error>
|
||||
|
||||
<div class="alert alert-warning" *ngIf="!success">
|
||||
<span jhiTranslate="reset.request.messages.info">Enter the email address you used to register.</span>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-success" *ngIf="success">
|
||||
<span jhiTranslate="reset.request.messages.success">Check your emails for details on how to reset your password.</span>
|
||||
</div>
|
||||
|
||||
<form *ngIf="!success" name="form" role="form" (ngSubmit)="requestReset()" [formGroup]="resetRequestForm">
|
||||
<div class="form-group">
|
||||
<label class="form-control-label" for="email" jhiTranslate="global.form.email.label">Email</label>
|
||||
<input
|
||||
type="email"
|
||||
class="form-control"
|
||||
id="email"
|
||||
name="email"
|
||||
placeholder="{{ 'global.form.email.placeholder' | translate }}"
|
||||
formControlName="email"
|
||||
data-cy="emailResetPassword"
|
||||
#email
|
||||
/>
|
||||
|
||||
<div
|
||||
*ngIf="
|
||||
resetRequestForm.get('email')!.invalid && (resetRequestForm.get('email')!.dirty || resetRequestForm.get('email')!.touched)
|
||||
"
|
||||
>
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="resetRequestForm.get('email')?.errors?.required"
|
||||
jhiTranslate="global.messages.validate.email.required"
|
||||
>
|
||||
Your email is required.
|
||||
</small>
|
||||
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="resetRequestForm.get('email')?.errors?.email"
|
||||
jhiTranslate="global.messages.validate.email.invalid"
|
||||
>
|
||||
Your email is invalid.
|
||||
</small>
|
||||
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="resetRequestForm.get('email')?.errors?.minlength"
|
||||
jhiTranslate="global.messages.validate.email.minlength"
|
||||
>
|
||||
Your email is required to be at least 5 characters.
|
||||
</small>
|
||||
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="resetRequestForm.get('email')?.errors?.maxlength"
|
||||
jhiTranslate="global.messages.validate.email.maxlength"
|
||||
>
|
||||
Your email cannot be longer than 100 characters.
|
||||
</small>
|
||||
<div class="account-pages pt-2 pt-sm-5 pb-4 pb-sm-5" style="height: 100vh; background-color: #f1f5f9">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-xxl-4 col-lg-5">
|
||||
<div class="card mt-5">
|
||||
<!-- Logo -->
|
||||
<div class="pl-4 pt-4 pr-4 pb-1 text-center">
|
||||
<img src="../../content/img_datasurvey/datasurvey-logo-text-black.svg" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
[disabled]="resetRequestForm.invalid"
|
||||
class="btn btn-primary"
|
||||
jhiTranslate="reset.request.form.button"
|
||||
data-cy="submit"
|
||||
>
|
||||
Reset
|
||||
</button>
|
||||
</form>
|
||||
<div class="card-body p-4">
|
||||
<div class="text-center w-75 m-auto">
|
||||
<h4
|
||||
class="text-dark-50 text-center pb-0 fw-bold p-0 m-0"
|
||||
style="color: #727070; font-weight: 700; font-size: 1.3rem"
|
||||
jhiTranslate="reset.request.title"
|
||||
>
|
||||
RESET YOUR PASSWORDD
|
||||
</h4>
|
||||
<p class="mb-4" style="color: rgba(146, 146, 146, 0.664)" jhiTranslate="reset.request.messages.info">
|
||||
Enter the email address you used to register.
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<div class="alert alert-success" *ngIf="success">
|
||||
<span jhiTranslate="reset.request.messages.success">Check your emails for details on how to reset your password.</span>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-danger" *ngIf="errorEmailNotExists" jhiTranslate="reset.request.messages.error.emailnotexists">
|
||||
<strong>Email no exists!</strong> Please choose another one.
|
||||
</div>
|
||||
</div>
|
||||
<form *ngIf="!success" name="form" class="ds-form" role="form" (ngSubmit)="requestReset()" [formGroup]="resetRequestForm">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="email" jhiTranslate="global.form.email.label">Email</label>
|
||||
<input
|
||||
type="email"
|
||||
class="form-control"
|
||||
id="email"
|
||||
name="email"
|
||||
placeholder="{{ 'global.form.email.placeholder' | translate }}"
|
||||
formControlName="email"
|
||||
data-cy="emailResetPassword"
|
||||
#email
|
||||
/>
|
||||
|
||||
<div
|
||||
*ngIf="
|
||||
resetRequestForm.get('email')!.invalid &&
|
||||
(resetRequestForm.get('email')!.dirty || resetRequestForm.get('email')!.touched)
|
||||
"
|
||||
>
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="resetRequestForm.get('email')?.errors?.required"
|
||||
jhiTranslate="global.messages.validate.email.required"
|
||||
>
|
||||
Your email is required.
|
||||
</small>
|
||||
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="resetRequestForm.get('email')?.errors?.email"
|
||||
jhiTranslate="global.messages.validate.email.invalid"
|
||||
>
|
||||
Your email is invalid.
|
||||
</small>
|
||||
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="resetRequestForm.get('email')?.errors?.minlength"
|
||||
jhiTranslate="global.messages.validate.email.minlength"
|
||||
>
|
||||
Your email is required to be at least 5 characters.
|
||||
</small>
|
||||
|
||||
<small
|
||||
class="form-text text-danger"
|
||||
*ngIf="resetRequestForm.get('email')?.errors?.maxlength"
|
||||
jhiTranslate="global.messages.validate.email.maxlength"
|
||||
>
|
||||
Your email cannot be longer than 100 characters.
|
||||
</small>
|
||||
<small class="form-text text-danger" *ngIf="resetRequestForm.get('email')?.errors?.email">
|
||||
Se requiere un correo electrónico válido.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<button
|
||||
type="button"
|
||||
id="cancel-save"
|
||||
data-cy="entityCreateCancelButton"
|
||||
class="ds-btn ds-btn--secondary"
|
||||
(click)="previousState()"
|
||||
>
|
||||
<fa-icon icon="arrow-left"></fa-icon> <span jhiTranslate="entity.action.back">Volver</span>
|
||||
</button>
|
||||
<button
|
||||
type="submit"
|
||||
[disabled]="resetRequestForm.invalid"
|
||||
class="ds-btn ds-btn--primary"
|
||||
jhiTranslate="reset.request.form.button"
|
||||
data-cy="submit"
|
||||
>
|
||||
Reset
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- end card-body -->
|
||||
</div>
|
||||
<!-- end card -->
|
||||
<div class="row mt-3">
|
||||
<div class="col-12 text-center">
|
||||
<p class="text-muted">
|
||||
¿Aún no se encuentra registrado/a?
|
||||
<a routerLink="/account/register" class="text-muted ms-1"><b>Crea una cuenta</b></a>
|
||||
</p>
|
||||
</div>
|
||||
<!-- end col -->
|
||||
</div>
|
||||
<!-- end row -->
|
||||
</div>
|
||||
<!-- end col -->
|
||||
</div>
|
||||
<!-- end row -->
|
||||
</div>
|
||||
<!-- end container -->
|
||||
</div>
|
||||
<!-- end page -->
|
||||
|
|
|
@ -2,6 +2,8 @@ import { Component, AfterViewInit, ElementRef, ViewChild } from '@angular/core';
|
|||
import { FormBuilder, Validators } from '@angular/forms';
|
||||
|
||||
import { PasswordResetInitService } from './password-reset-init.service';
|
||||
import { HttpErrorResponse } from '@angular/common/http';
|
||||
import { EMAIL_NOT_EXISTS_TYPE } from '../../../config/error.constants';
|
||||
|
||||
@Component({
|
||||
selector: 'jhi-password-reset-init',
|
||||
|
@ -10,7 +12,8 @@ import { PasswordResetInitService } from './password-reset-init.service';
|
|||
export class PasswordResetInitComponent implements AfterViewInit {
|
||||
@ViewChild('email', { static: false })
|
||||
email?: ElementRef;
|
||||
|
||||
errorEmailNotExists = false;
|
||||
error = false;
|
||||
success = false;
|
||||
resetRequestForm = this.fb.group({
|
||||
email: ['', [Validators.required, Validators.minLength(5), Validators.maxLength(254), Validators.email]],
|
||||
|
@ -25,6 +28,22 @@ export class PasswordResetInitComponent implements AfterViewInit {
|
|||
}
|
||||
|
||||
requestReset(): void {
|
||||
this.passwordResetInitService.save(this.resetRequestForm.get(['email'])!.value).subscribe(() => (this.success = true));
|
||||
this.errorEmailNotExists = false;
|
||||
this.passwordResetInitService.save(this.resetRequestForm.get(['email'])!.value).subscribe(
|
||||
() => (this.success = true),
|
||||
response => this.processError(response)
|
||||
);
|
||||
}
|
||||
|
||||
previousState(): void {
|
||||
window.history.back();
|
||||
}
|
||||
|
||||
processError(response: HttpErrorResponse): void {
|
||||
if (response.status === 400 && response.error.type === EMAIL_NOT_EXISTS_TYPE) {
|
||||
this.errorEmailNotExists = true;
|
||||
} else {
|
||||
this.error = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export const PROBLEM_BASE_URL = 'https://www.jhipster.tech/problem';
|
||||
export const EMAIL_ALREADY_USED_TYPE = PROBLEM_BASE_URL + '/email-already-used';
|
||||
export const LOGIN_ALREADY_USED_TYPE = PROBLEM_BASE_URL + '/login-already-used';
|
||||
export const EMAIL_NOT_EXISTS_TYPE = PROBLEM_BASE_URL + '/email-not-exists';
|
||||
|
|
|
@ -67,7 +67,8 @@
|
|||
"link": "iniciar sesión",
|
||||
"suffix": ", puede intentar con las cuentas predeterminadas:<br/>- Administrador (usuario=\"admin\" y contraseña=\"admin\") <br/>- Usuario (usuario=\"user\" y contraseña=\"user\").",
|
||||
"updateForm": "Ocurrió un error al actualizar su información, favor revisar los campos e intentar de nuevo",
|
||||
"passwordForm": "Ocurrió un error al actualizar su contraseña, favor revisar los campos e intentar de nuevo"
|
||||
"passwordForm": "Ocurrió un error al actualizar su contraseña, favor revisar los campos e intentar de nuevo",
|
||||
"botonInicio": "Iniciar Sesión"
|
||||
},
|
||||
"register": {
|
||||
"noaccount": "¿Aún no tienes una cuenta?",
|
||||
|
|
|
@ -7,7 +7,10 @@
|
|||
},
|
||||
"messages": {
|
||||
"info": "Introduzca la dirección de correo electrónico que utilizó para registrarse",
|
||||
"success": "Revise su correo electrónico para obtener más información sobre cómo restablecer su contraseña."
|
||||
"success": "Revise su correo electrónico para obtener más información sobre cómo restablecer su contraseña.",
|
||||
"error": {
|
||||
"emailnotexists": "<strong>¡El correo electrónico no se encuentra registrado en el sistema!</strong> Por favor, ingrese otro email."
|
||||
}
|
||||
}
|
||||
},
|
||||
"finish": {
|
||||
|
|
Loading…
Reference in New Issue