diff --git a/curriculumsearch/src/main/resources/static/main.js b/curriculumsearch/src/main/resources/static/main.js index e30ef26..528e317 100644 --- a/curriculumsearch/src/main/resources/static/main.js +++ b/curriculumsearch/src/main/resources/static/main.js @@ -90,22 +90,31 @@ function agregarFieldExpierncia(event){ //imprimir lista actualizada const div = document.querySelector("#experiencias") const div1 = document.createElement('div'); - let content='" - div1.innerHTML = content - div.innerHTML = ''; - div.appendChild(div1); + //content += "" + div.innerHTML = content + //div.innerHTML = ''; + //div.appendChild(div1); cont_experiencia++; } /*--------------------------------------------------------------------*/ @@ -152,24 +161,26 @@ function agregarFieldTecnologia(){ const div1 = document.createElement('div'); console.log(tecnologias[0]) - let content1='" - div1.innerHTML = content1 - div.innerHTML = ''; - div.appendChild(div1); + //content1 += "" + div.innerHTML = content1 + //div.innerHTML = ''; + //div.appendChild(div1); cont_tecnologia++; + document.querySelector("#no-valid-tecno").style.display = "none"; } @@ -192,6 +203,16 @@ function serializeJSON (form) { // Create a new FormData object const formData = new FormData(form); + if(formData.get('fechaNacimiento')>=new Date().toISOString().slice(0,10)){ + form['fechaNacimiento'].setCustomValidity('Fecha de nacimiento debe ser menor que actual') + noValidateFlag = true; + return; + } + else{ + form['fechaNacimiento'].setCustomValidity('') + } + + // Create an object to hold the name/value pairs const pairs = {}; @@ -274,8 +295,11 @@ form.addEventListener("submit",(evt)=>{ // evt.stopPropagation() // } // form.classList.add('was-validated') + evt.preventDefault(); + let formSerialized = serializeJSON(form); + let fileCV = obtenerCV(); if(!noValidateFlag){ - postData('work-with-us', formatearJsonWithFile(serializeJSON(form),obtenerCV())) + postData('work-with-us', formatearJsonWithFile(formSerialized,fileCV)) .then(response => { if(response.status==200 || response.status==302){ location.replace(response.url); @@ -283,8 +307,7 @@ form.addEventListener("submit",(evt)=>{ console.log(response.text().then(value => console.log(value))) } }); - evt.preventDefault(); - } + } noValidateFlag = false } ); @@ -348,23 +371,29 @@ function agregarFieldEstudio(){ //imprimir lista actualizada const div = document.querySelector("#estudios") const div1 = document.createElement('div'); - let content='" - div1.innerHTML = content - div.innerHTML = ''; - div.appendChild(div1); + + div.innerHTML = content + //div.innerHTML = ''; + //div.appendChild(div1); cont_estudios++; } @@ -431,23 +460,24 @@ function agregarFieldCargo(){ const div = document.querySelector("#cargos") const div1 = document.createElement('div'); - let content1='" - div1.innerHTML = content1 - div.innerHTML = ''; - div.appendChild(div1); + //content1 += "" + div.innerHTML = content1 + //div.innerHTML = ''; + //div.appendChild(div1); cont_cargo++; + document.querySelector("#no-valid-cargo").style.display = "none"; } /*---------------------------------------------------------------------------------------------------*/ @@ -532,22 +562,25 @@ function agregarFieldReferencia(event){ //imprimir lista actualizada const div = document.querySelector("#referencia") const div1 = document.createElement('div'); - let content='" - div1.innerHTML = content - div.innerHTML = ''; - div.appendChild(div1); + //content += "" + div.innerHTML = content + //div.innerHTML = ''; + //div.appendChild(div1); cont_referencias++; } diff --git a/curriculumsearch/src/main/webapp/css/formPostulanteStyle.css b/curriculumsearch/src/main/webapp/css/formPostulanteStyle.css index 25dad7d..f227aa3 100644 --- a/curriculumsearch/src/main/webapp/css/formPostulanteStyle.css +++ b/curriculumsearch/src/main/webapp/css/formPostulanteStyle.css @@ -1,6 +1,6 @@ body { - /* background-color: #506BEE; */ - background-image:url(/img/fondo.png); + background-color: #baebd8; + /* background-image:url(/img/fondo2.png); */ /*background-size:cover;*/ background-repeat:repeat; height:100vh;width:100vw; diff --git a/curriculumsearch/src/main/webapp/jsp/detallepostulante.jsp b/curriculumsearch/src/main/webapp/jsp/detallepostulante.jsp index 0791ec2..11f7542 100644 --- a/curriculumsearch/src/main/webapp/jsp/detallepostulante.jsp +++ b/curriculumsearch/src/main/webapp/jsp/detallepostulante.jsp @@ -240,7 +240,7 @@
-
diff --git a/curriculumsearch/src/main/webapp/jsp/postulante-form.jsp b/curriculumsearch/src/main/webapp/jsp/postulante-form.jsp index 3e8973b..bc30149 100644 --- a/curriculumsearch/src/main/webapp/jsp/postulante-form.jsp +++ b/curriculumsearch/src/main/webapp/jsp/postulante-form.jsp @@ -16,212 +16,176 @@
-
-
-
- -
-

Curriculum

-
-
- - -
- Luce Bien! -
- -
- -
- - -
- Luce Bien! -
-
- -
- - -
- Luce Bien! -
-
- - -
- - -
- Luce Bien! -
-
- -
- -
- -
- - -
- -
- - -
- Luce Bien! -
-
- -
- - -
- -
- - -
-
- - -
- Luce Bien! -
-
- -
- - -
- Luce Bien! -
-
- - -
- -
- -
- -
- -
- -
-
- - -
- -
-
- -  Cargo al que postulas - -

-
- - -
-
- - -
-
- -  Agregar Experiencia - -

-
- -
-
- - -
-
- -  Agregar Estudio - -

-
- -
-
- - -
-
- -  Agregar Tecnologia - -

-
- - - -
-
- - -
-
- -  Referencias Personales - -

-
-
-
- - - -
- Cancelar - -
-
-
-
+
+
+
+ +
+

Curriculum

+
+
+ + +
+ Luce Bien! +
+ +
+ +
+ + +
+ Luce Bien! +
+
+ +
+ + +
+ Luce Bien! +
+
+ + +
+ + +
+ Luce Bien! +
+
+ +
+ +
+ +
+ + +
+ +
+ + +
+ Luce Bien! +
+
+ +
+ + +
+ +
+ + +
+
+ + +
+ Luce Bien! +
+
+ +
+ + +
+ Luce Bien! +
+
+ + +
+ +
+ +
+ +
+ +
+ + +
+
+ + +
+ +
+ +
+ + +
+
+ + +
+
+ + + +
+ + +
+
+ + +
+
+ + + +
+ Cancelar + +
+
+
+