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
1
Merge Requests
1
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
Oscar Enrique Gonzalez Escurra
th-app-java
Commits
13c59b8a
Commit
13c59b8a
authored
Nov 15, 2021
by
Cesar Giulano Gonzalez Maqueda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Algunas mejoras a la GUI
parent
f9730393
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
24 deletions
+38
-24
curriculumsearch/src/main/java/com/roshka/controller/RRHHUserController.java
+8
-4
curriculumsearch/src/main/java/com/roshka/modelo/Postulante.java
+4
-3
curriculumsearch/src/main/webapp/jsp/edit-user-data.jsp
+1
-0
curriculumsearch/src/main/webapp/jsp/header.jsp
+25
-1
curriculumsearch/src/main/webapp/jsp/register_success.jsp
+0
-16
No files found.
curriculumsearch/src/main/java/com/roshka/controller/RRHHUserController.java
View file @
13c59b8a
...
...
@@ -67,17 +67,21 @@ public class RRHHUserController {
}
@PostMapping
(
"/process_register"
)
public
String
processRegister
(
HttpServletRequest
request
,
RRHHUser
user
)
{
public
RedirectView
processRegister
(
HttpServletRequest
request
,
RRHHUser
user
,
RedirectAttributes
redirectAttributes
)
{
RedirectView
redirectView
=
new
RedirectView
(
"/register"
,
true
);
redirectAttributes
.
addFlashAttribute
(
"success"
,
"Datos actualizados"
);
if
(
Long
.
parseLong
(
request
.
getParameter
(
"registrationCode"
))
!=
REGISTER_CODE
){
return
"redirect:/register"
;
redirectAttributes
.
addFlashAttribute
(
"error"
,
"Codigo Incorrecto"
);
return
redirectView
;
}
BCryptPasswordEncoder
passwordEncoder
=
new
BCryptPasswordEncoder
();
String
encodedPassword
=
passwordEncoder
.
encode
(
user
.
getPassword
());
user
.
setPassword
(
encodedPassword
);
rrhhUserRepository
.
save
(
user
);
return
"register_success"
;
redirectView
.
setUrl
(
"/login"
);
redirectAttributes
.
addFlashAttribute
(
"success"
,
"Registro Correcto"
);
return
redirectView
;
}
@GetMapping
(
"/edit-user-data"
)
...
...
curriculumsearch/src/main/java/com/roshka/modelo/Postulante.java
View file @
13c59b8a
...
...
@@ -67,7 +67,8 @@ public class Postulante {
private
Long
nivelIngles
;
@Column
(
name
=
"curriculum"
)
private
String
curriculum
;
@Lob
private
byte
[]
curriculum
;
@Column
(
name
=
"estado_civil"
)
@NotNull
...
...
@@ -192,11 +193,11 @@ public class Postulante {
this
.
nivelIngles
=
nivelIngles
;
}
public
String
getCurriculum
()
{
public
byte
[]
getCurriculum
()
{
return
curriculum
;
}
public
void
setCurriculum
(
String
curriculum
)
{
public
void
setCurriculum
(
byte
[]
curriculum
)
{
this
.
curriculum
=
curriculum
;
}
...
...
curriculumsearch/src/main/webapp/jsp/edit-user-data.jsp
View file @
13c59b8a
...
...
@@ -53,6 +53,7 @@
</div>
<button
type=
"submit"
class=
"btn btn-success btn-lg mb-1"
>
Submit
</button>
<a
href=
"/home"
class=
"btn btn-danger btn-lg mr-3 ml-3 mb-1"
>
Volver
</a>
</form:form>
</div>
...
...
curriculumsearch/src/main/webapp/jsp/header.jsp
View file @
13c59b8a
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<header>
...
...
@@ -49,7 +52,10 @@
<a class="nav-link" href="/edit-user-data">Editar mis datos</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/logout">Salir</a>
<%-- <a class="nav-link" href="/logout">Salir</a>--%>
<button type="button" class="btn btn-light" data-toggle="modal" data-target="#exampleModal">
Salir
</button>
</li>
</ul>
...
...
@@ -57,3 +63,20 @@
</div>
</nav>
</header>
<!-- Modal -->
<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>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/register_success.jsp
deleted
100644 → 0
View file @
f9730393
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"ISO-8859-1"
>
<title>
Registration Success
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/webjars/bootstrap/css/bootstrap.min.css"
/>
</head>
<body>
<div
class=
"container text-center"
>
<h3>
You have signed up successfully!
</h3>
<h4><a
href=
"${pageContext.request.contextPath}/login"
>
Click here to Login
</a></h4>
</div>
</body>
</html>
\ No newline at end of file
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