Commit b18ad9e9 by Joel Florentin

home controller

parent fd8a70fe
package com.roshka.controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping("/home")
public class HomeController {
@RequestMapping()
public String home(Model model) {
return "index";
}
}
...@@ -81,13 +81,6 @@ public class PostulanteController { ...@@ -81,13 +81,6 @@ public class PostulanteController {
this.carRepo=carRepo; this.carRepo=carRepo;
} }
@RequestMapping("home")
public String index() {
return "index";
}
@RequestMapping("/postulantes") @RequestMapping("/postulantes")
public String postulantes(Model model, public String postulantes(Model model,
@RequestParam(required = false)Long tecId, @RequestParam(required = false)Long tecId,
...@@ -225,5 +218,5 @@ public class PostulanteController { ...@@ -225,5 +218,5 @@ public class PostulanteController {
//post.save(postulanteVd); //post.save(postulanteVd);
return "redirect:/postulante/"+postulanteId; return "redirect:/postulante/"+postulanteId;
} }
} }
\ No newline at end of file
...@@ -24,15 +24,15 @@ contentType="text/html;charset=UTF-8" language="java" %> ...@@ -24,15 +24,15 @@ contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="header.jsp" /> <jsp:include page="header.jsp" />
<jsp:include page="alerts.jsp" /> <jsp:include page="alerts.jsp" />
<div class="container-xxl my-md-4 bd-layout"> <div class="container-xxl my-md-4 bd-layout">
<h2>Agregar Cargo</h2> <div class="card d-flex flex-column justify-content-center align-items-center mx-auto mt-2 p-3" style="width: 20rem;">
<div class="p-3 mb-2 bg-light text-dark border border-light"> <h5 class="card-title">${cargo.id == null ? "Agregar" : "Modificar"} Cargo</h5>
<form:form <form:form
action="/cargo/${cargo.id == null ? '' : cargo.id}" action="/cargo/${cargo.id == null ? '' : cargo.id}"
method="post" method="post"
modelAttribute="cargo" modelAttribute="cargo"
class="row row-cols-lg-auto g-3 align-items-center" class="card-body d-flex flex-column"
> >
<div class="col-12"> <div class="">
<form:label class="form-label visually-hidden" path="nombre" <form:label class="form-label visually-hidden" path="nombre"
>Nombre del cargo >Nombre del cargo
</form:label> </form:label>
...@@ -44,7 +44,7 @@ contentType="text/html;charset=UTF-8" language="java" %> ...@@ -44,7 +44,7 @@ contentType="text/html;charset=UTF-8" language="java" %>
/> />
</div> </div>
<div class="col-12"> <div class="mt-2 align-self-end">
<input type="submit" value="Guardar" class="btn btn-primary" /> <input type="submit" value="Guardar" class="btn btn-primary" />
</div> </div>
</form:form> </form:form>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment