Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
th-app-java
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Amparo Oliver
th-app-java
Commits
8d481fa4
Commit
8d481fa4
authored
Nov 25, 2021
by
Joel Florentin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'giuli_001' of
https://phoebe.roshka.com/gitlab/hshah/TalentoHumano
into joel-001
parents
9a8264d4
787511df
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
92 additions
and
33 deletions
+92
-33
curriculumsearch/src/main/java/com/roshka/controller/RRHHUserController.java
+13
-3
curriculumsearch/src/main/webapp/jsp/forgot_password_form.jsp
+12
-5
curriculumsearch/src/main/webapp/jsp/index.jsp
+11
-1
curriculumsearch/src/main/webapp/jsp/layouts/base.jsp
+16
-0
curriculumsearch/src/main/webapp/jsp/registration.jsp
+14
-6
curriculumsearch/src/main/webapp/jsp/reset_password_form.jsp
+26
-18
No files found.
curriculumsearch/src/main/java/com/roshka/controller/RRHHUserController.java
View file @
8d481fa4
...
@@ -26,7 +26,7 @@ import java.util.concurrent.Executors;
...
@@ -26,7 +26,7 @@ import java.util.concurrent.Executors;
@Controller
@Controller
public
class
RRHHUserController
{
public
class
RRHHUserController
{
private
static
final
long
REGISTER_CODE
=
1234
;
private
static
String
REGISTER_CODE
=
"123456"
;
RRHHUserRepository
rrhhUserRepository
;
RRHHUserRepository
rrhhUserRepository
;
@Autowired
@Autowired
...
@@ -46,6 +46,15 @@ public class RRHHUserController {
...
@@ -46,6 +46,15 @@ public class RRHHUserController {
return
"registration"
;
return
"registration"
;
}
}
@PostMapping
(
"/generarCodigoRegistro"
)
public
RedirectView
generarCodigoRegistro
(
Model
model
,
RedirectAttributes
redirectAttributes
){
RedirectView
redirectView
=
new
RedirectView
(
"/home"
,
true
);
REGISTER_CODE
=
RandomString
.
make
(
6
);
redirectAttributes
.
addFlashAttribute
(
"clave"
,
REGISTER_CODE
);
return
redirectView
;
}
@GetMapping
(
"/login"
)
@GetMapping
(
"/login"
)
public
String
getLogin
(
Model
model
,
HttpServletRequest
request
)
{
public
String
getLogin
(
Model
model
,
HttpServletRequest
request
)
{
if
(
request
.
getParameter
(
"error"
)!=
null
){
if
(
request
.
getParameter
(
"error"
)!=
null
){
...
@@ -57,8 +66,7 @@ public class RRHHUserController {
...
@@ -57,8 +66,7 @@ public class RRHHUserController {
@PostMapping
(
"/process_register"
)
@PostMapping
(
"/process_register"
)
public
RedirectView
processRegister
(
HttpServletRequest
request
,
RRHHUser
user
,
RedirectAttributes
redirectAttributes
)
{
public
RedirectView
processRegister
(
HttpServletRequest
request
,
RRHHUser
user
,
RedirectAttributes
redirectAttributes
)
{
RedirectView
redirectView
=
new
RedirectView
(
"/register"
,
true
);
RedirectView
redirectView
=
new
RedirectView
(
"/register"
,
true
);
redirectAttributes
.
addFlashAttribute
(
"success"
,
"Datos actualizados"
);
if
(!
request
.
getParameter
(
"registrationCode"
).
equals
(
REGISTER_CODE
)){
if
(
Long
.
parseLong
(
request
.
getParameter
(
"registrationCode"
))
!=
REGISTER_CODE
){
redirectAttributes
.
addFlashAttribute
(
"error"
,
"Codigo Incorrecto"
);
redirectAttributes
.
addFlashAttribute
(
"error"
,
"Codigo Incorrecto"
);
return
redirectView
;
return
redirectView
;
}
}
...
@@ -140,6 +148,8 @@ public class RRHHUserController {
...
@@ -140,6 +148,8 @@ public class RRHHUserController {
});
});
emailExecutor
.
shutdown
();
emailExecutor
.
shutdown
();
model
.
addAttribute
(
"success"
,
"Se ha enviado el link de recuperación a su "
+
"correo electronico. Si no lo recibió intente nuevamente."
);
return
"forgot_password_form"
;
return
"forgot_password_form"
;
}
}
...
...
curriculumsearch/src/main/webapp/jsp/forgot_password_form.jsp
View file @
8d481fa4
...
@@ -8,20 +8,27 @@
...
@@ -8,20 +8,27 @@
<title>
Forgot Password
</title>
<title>
Forgot Password
</title>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
<link
href=
"https://getbootstrap.com/docs/4.0/examples/signin/signin.css"
rel=
"stylesheet"
crossorigin=
"anonymous"
>
<link
href=
"https://getbootstrap.com/docs/4.0/examples/signin/signin.css"
rel=
"stylesheet"
crossorigin=
"anonymous"
>
<link
rel=
"icon"
href=
"/img/LogoRoshka.ico"
>
<link
rel=
"icon"
href=
"
..
/img/LogoRoshka.ico"
>
<link
href=
"../css/cargoStyle.css"
rel=
"stylesheet"
type=
"text/css"
/>
</head>
</head>
<body>
<body>
<a
type=
"button"
class=
"btn btn-xl btn-light m-3"
href=
"/login"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
fill=
"currentColor"
class=
"bi bi-box-arrow-in-left"
viewBox=
"0 0 16 16"
>
<path
fill-rule=
"evenodd"
d=
"M10 3.5a.5.5 0 0 0-.5-.5h-8a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 1 1 0v2A1.5 1.5 0 0 1 9.5 14h-8A1.5 1.5 0 0 1 0 12.5v-9A1.5 1.5 0 0 1 1.5 2h8A1.5 1.5 0 0 1 11 3.5v2a.5.5 0 0 1-1 0v-2z"
/>
<path
fill-rule=
"evenodd"
d=
"M4.146 8.354a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5H14.5a.5.5 0 0 1 0 1H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3z"
/>
</svg>
Volver
</a>
<jsp:include
page=
"alerts.jsp"
/>
<jsp:include
page=
"alerts.jsp"
/>
<div
class=
"container"
>
<div
class=
"container
mb-3
"
>
<h2
class=
"col float-center"
>
Recuperación de Contraseña
</h2>
<h2
style=
"text-align: center;"
>
Recuperacion de Password
</h2>
</div>
</div>
<form:form
action=
"/forgot-password"
method=
"post"
style=
"max-width: 420px; margin: 0 auto;"
>
<form:form
action=
"/forgot-password"
method=
"post"
style=
"max-width: 420px; margin: 0 auto;"
>
<div
class=
"border border-secondary rounded p-3"
>
<div
class=
"border border-secondary rounded p-3"
>
<div>
<div>
<p>
Te enviaremos el link de recuperaci
ó
n de tu cuenta a tu email
</p>
<p>
Te enviaremos el link de recuperaci
o
n de tu cuenta a tu email
</p>
</div>
</div>
<div>
<div>
<p>
<p>
...
...
curriculumsearch/src/main/webapp/jsp/index.jsp
View file @
8d481fa4
...
@@ -7,5 +7,14 @@
...
@@ -7,5 +7,14 @@
<link href="/css/indexStyle.css" rel="stylesheet" type="text/css"/>
<link href="/css/indexStyle.css" rel="stylesheet" type="text/css"/>
<link rel="icon" href="/img/LogoRoshka.ico">
<link rel="icon" href="/img/LogoRoshka.ico">
</layout:put>
</layout:put>
<layout:put block="contents" type="REPLACE">
<body>
<form:form method="post" action="/generarCodigoRegistro">
<button class="btn btn-outline-light"><strong>Generar clave de Registro:</strong></button> ${clave}
</form:form>
<c:if test="${clave}">
Clave de Registro:
</c:if>
</body>
</layout:put>
</layout:extends>
</layout:extends>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/layouts/base.jsp
View file @
8d481fa4
...
@@ -72,6 +72,22 @@
...
@@ -72,6 +72,22 @@
</div>
</div>
</nav>
</nav>
</header>
</header>
<div
class=
"modal fade"
id=
"exampleModal"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"exampleModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h6
class=
"modal-title"
id=
"exampleModalLabel"
>
Esta seguro que desea salir?
</h6>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-secondary"
data-dismiss=
"modal"
>
Close
</button>
<a
href=
"/logout"
class=
"btn btn-danger"
>
Salir
</a>
</div>
</div>
</div>
</div>
<div
class=
"container-xxl my-md-4 bd-layout"
>
<div
class=
"container-xxl my-md-4 bd-layout"
>
<layout:block
name=
"contents"
>
<layout:block
name=
"contents"
>
...
...
curriculumsearch/src/main/webapp/jsp/registration.jsp
View file @
8d481fa4
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin=
"anonymous"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin=
"anonymous"
></script>
<link
href=
"../css/cargoStyle.css"
rel=
"stylesheet"
type=
"text/css"
/>
</head>
</head>
<style>
<style>
@media
(
min-width
:
1025px
)
{
@media
(
min-width
:
1025px
)
{
...
@@ -18,14 +18,22 @@
...
@@ -18,14 +18,22 @@
}
}
</style>
</style>
<body>
<body>
<a
type=
"button"
class=
"btn btn-xl btn-light m-3"
href=
"/login"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
fill=
"currentColor"
class=
"bi bi-box-arrow-in-left"
viewBox=
"0 0 16 16"
>
<path
fill-rule=
"evenodd"
d=
"M10 3.5a.5.5 0 0 0-.5-.5h-8a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 1 1 0v2A1.5 1.5 0 0 1 9.5 14h-8A1.5 1.5 0 0 1 0 12.5v-9A1.5 1.5 0 0 1 1.5 2h8A1.5 1.5 0 0 1 11 3.5v2a.5.5 0 0 1-1 0v-2z"
/>
<path
fill-rule=
"evenodd"
d=
"M4.146 8.354a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5H14.5a.5.5 0 0 1 0 1H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3z"
/>
</svg>
Volver
</a>
<section
class=
"h-100 h-custom"
>
<section
class=
"h-100 h-custom"
>
<div
class=
"container py-5 h-100"
>
<div
class=
"container py-5 h-100"
>
<jsp:include
page=
"alerts.jsp"
/>
<div
class=
"row d-flex justify-content-center align-items-center h-100"
>
<div
class=
"row d-flex justify-content-center align-items-center h-100"
>
<div
class=
"col-lg-8 col-xl-6"
>
<div
class=
"col-lg-8 col-xl-6"
>
<h3
class=
"mb-4 pb-2 pb-md-0 mb-md-5 px-md-2"
style=
"text-align: center;"
>
Informacion de Registro
</h3>
<div
class=
"card rounded-3"
>
<div
class=
"card rounded-3"
>
<img
src=
"https://cdn.pixabay.com/photo/2013/08/09/05/54/layer-170971_960_720.jpg"
class=
"w-100"
style=
"border-top-left-radius: .3rem; border-top-right-radius: .3rem;height: 250px;"
alt=
"Sample photo"
;
>
<div
class=
"card-body p-4 p-md-5"
>
<div
class=
"card-body p-4 p-md-5"
>
<h3
class=
"mb-4 pb-2 pb-md-0 mb-md-5 px-md-2"
>
Informacion de Registro
</h3>
<form:form
action=
"/process_register"
class=
"px-md-2"
method=
"POST"
modelAttribute=
"user"
>
<form:form
action=
"/process_register"
class=
"px-md-2"
method=
"POST"
modelAttribute=
"user"
>
<div
class=
"form-outline mb-4"
>
<div
class=
"form-outline mb-4"
>
...
@@ -55,14 +63,14 @@
...
@@ -55,14 +63,14 @@
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<div
class=
"form-outline"
>
<div
class=
"form-outline"
>
<
input
type=
"text"
id=
"form3Example1w"
class=
"form-control"
name=
"registrationCode"
required
/
>
<
label
class=
"form-label"
for=
"form3Example1w"
style=
"width: 600px"
>
Clave de Registro
</label
>
<
label
class=
"form-label"
for=
"form3Example1w"
>
Registration code
</label
>
<
input
type=
"password"
id=
"form3Example1w"
class=
"form-control"
name=
"registrationCode"
required
/
>
</div>
</div>
</div>
</div>
</div>
</div>
<button
type=
"submit"
class=
"btn btn-
success
btn-lg mb-1"
>
Submit
</button>
<button
type=
"submit"
class=
"btn btn-
primary
btn-lg mb-1"
>
Submit
</button>
</form:form>
</form:form>
</div>
</div>
...
...
curriculumsearch/src/main/webapp/jsp/reset_password_form.jsp
View file @
8d481fa4
...
@@ -7,29 +7,37 @@
...
@@ -7,29 +7,37 @@
<meta
name=
"author"
content=
""
>
<meta
name=
"author"
content=
""
>
<title>
Forgot Password
</title>
<title>
Forgot Password
</title>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
<link
href=
"https://getbootstrap.com/docs/4.0/examples/signin/signin.css"
rel=
"stylesheet"
crossorigin=
"anonymous"
>
<link
href=
"../css/cargoStyle.css"
rel=
"stylesheet"
type=
"text/css"
/>
</head>
</head>
<body>
<body>
<jsp:include
page=
"alerts.jsp"
/>
<a
type=
"button"
class=
"btn btn-xl btn-light m-3"
href=
"/login"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
fill=
"currentColor"
class=
"bi bi-box-arrow-in-left"
viewBox=
"0 0 16 16"
>
<path
fill-rule=
"evenodd"
d=
"M10 3.5a.5.5 0 0 0-.5-.5h-8a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 1 1 0v2A1.5 1.5 0 0 1 9.5 14h-8A1.5 1.5 0 0 1 0 12.5v-9A1.5 1.5 0 0 1 1.5 2h8A1.5 1.5 0 0 1 11 3.5v2a.5.5 0 0 1-1 0v-2z"
/>
<path
fill-rule=
"evenodd"
d=
"M4.146 8.354a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5H14.5a.5.5 0 0 1 0 1H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3z"
/>
</svg>
Volver
</a>
<div
class=
"container"
>
<div
class=
"container"
>
<h2>
Cambia tu contraseña
</h2>
<jsp:include
page=
"alerts.jsp"
/>
</div>
<div
class=
"m-3"
>
<h2
style=
"text-align: center;"
>
Cambia tu password
</h2>
</div>
<form:form
action=
"/reset-password"
method=
"post"
style=
"max-width: 350px; margin: 0 auto;"
>
<form:form
action=
"/reset-password"
method=
"post"
style=
"max-width: 350px; margin: 0 auto;"
>
<input
type=
"hidden"
name=
"token"
value=
"${token}"
/>
<input
type=
"hidden"
name=
"token"
value=
"${token}"
/>
<div
class=
"border border-secondary rounded p-3"
>
<div
class=
"border border-secondary rounded p-3"
>
<div>
<div>
<p>
<p>
<input
type=
"password"
name=
"password"
id=
"password"
class=
"form-control"
<input
type=
"password"
name=
"password"
id=
"password"
class=
"form-control"
placeholder=
"Enter your new password"
required
autofocus
/>
placeholder=
"Enter your new password"
required
autofocus
/>
</p>
</p>
<p
class=
"text-center"
>
<p
class=
"text-center"
>
<input
type=
"submit"
value=
"Change Password"
class=
"btn btn-primary"
/>
<input
type=
"submit"
value=
"Change Password"
class=
"btn btn-primary"
/>
</p>
</p>
</div>
</div>
</div>
</
div
>
</
form:form
>
</
form:form
>
</
div
>
</body>
</body>
</html>
</html>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment