Acabando pruebas y ajustando css yarreglado fallos. Revisando creacion dl usuario inicial adinistrador
parent
a287df1ab8
commit
1d65f92f3e
@ -1,122 +0,0 @@
|
|||||||
-- Insert 'READ', 'WRITE', and 'DELETE' into the autoridad table if the table is empty
|
|
||||||
INSERT INTO autoridad (nombre)
|
|
||||||
SELECT 'READ' WHERE NOT EXISTS (SELECT 1 FROM autoridad);
|
|
||||||
INSERT INTO autoridad (nombre)
|
|
||||||
SELECT 'WRITE' WHERE NOT EXISTS (SELECT 1 FROM autoridad);
|
|
||||||
INSERT INTO autoridad (nombre)
|
|
||||||
SELECT 'DELETE' WHERE NOT EXISTS (SELECT 1 FROM autoridad);
|
|
||||||
|
|
||||||
INSERT INTO skills (nombre)
|
|
||||||
SELECT 'Java' WHERE NOT EXISTS (SELECT 1 FROM skills);
|
|
||||||
|
|
||||||
INSERT INTO skills (nombre)
|
|
||||||
SELECT 'Microsoft XL' WHERE NOT EXISTS (SELECT 1 FROM skills);
|
|
||||||
|
|
||||||
INSERT INTO skills (nombre)
|
|
||||||
SELECT 'Ingles' WHERE NOT EXISTS (SELECT 1 FROM skills);
|
|
||||||
|
|
||||||
INSERT INTO skills (nombre)
|
|
||||||
SELECT 'Aluman' WHERE NOT EXISTS (SELECT 1 FROM skills);
|
|
||||||
|
|
||||||
INSERT INTO skills (nombre)
|
|
||||||
SELECT 'Ruso' WHERE NOT EXISTS (SELECT 1 FROM skills);
|
|
||||||
|
|
||||||
INSERT INTO skills (nombre)
|
|
||||||
SELECT 'Python' WHERE NOT EXISTS (SELECT 1 FROM skills);
|
|
||||||
|
|
||||||
INSERT INTO skills (nombre)
|
|
||||||
SELECT 'C++' WHERE NOT EXISTS (SELECT 1 FROM skills);
|
|
||||||
|
|
||||||
INSERT INTO skills (nombre)
|
|
||||||
SELECT 'C#' WHERE NOT EXISTS (SELECT 1 FROM skills);
|
|
||||||
|
|
||||||
INSERT INTO skills (nombre)
|
|
||||||
SELECT 'HTML' WHERE NOT EXISTS (SELECT 1 FROM skills);
|
|
||||||
|
|
||||||
INSERT INTO skills (nombre)
|
|
||||||
SELECT 'CSS' WHERE NOT EXISTS (SELECT 1 FROM skills);
|
|
||||||
|
|
||||||
INSERT INTO skills (nombre)
|
|
||||||
SELECT 'JavaScript' WHERE NOT EXISTS (SELECT 1 FROM skills);
|
|
||||||
|
|
||||||
INSERT INTO skills (nombre)
|
|
||||||
SELECT 'PHP' WHERE NOT EXISTS (SELECT 1 FROM skills);
|
|
||||||
|
|
||||||
INSERT INTO skills (nombre)
|
|
||||||
SELECT 'SQL' WHERE NOT EXISTS (SELECT 1 FROM skills);
|
|
||||||
|
|
||||||
INSERT INTO skills (nombre)
|
|
||||||
SELECT 'Marketing' WHERE NOT EXISTS (SELECT 1 FROM skills);
|
|
||||||
|
|
||||||
INSERT INTO skills (nombre)
|
|
||||||
SELECT 'Carnet de conducir' WHERE NOT EXISTS (SELECT 1 FROM skills);
|
|
||||||
|
|
||||||
-- Insert for sectores
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Agricultura' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Tecnologías de la información y la comunicación' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Ganadería' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Pesca' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Silvicultura' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Turismo' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Minería' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Industria manufacturera' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Construcción' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Industria energética' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Industria química' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Transporte y logística' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Turismo y hostelería' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Salud' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Finanzas' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Telecomunicaciones' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Entretenimiento y medios' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Servicios profesionales' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Investigación y desarrollo (I+D)' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Tecnologías de la información y la comunicación (TIC)' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Servicios de información' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Servicios gubernamentales' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
||||||
|
|
||||||
INSERT INTO sectores (nombre)
|
|
||||||
SELECT 'Servicios sin ánimo de lucro' WHERE NOT EXISTS (SELECT 1 FROM sectores);
|
|
@ -0,0 +1,136 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<title>Editar Usuario</title>
|
||||||
|
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css">
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css">
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" th:href="@{/top.css}">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
form {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
max-width: none;
|
||||||
|
margin: auto;
|
||||||
|
padding: 25px;
|
||||||
|
margin-top: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
margin-top: 25px;
|
||||||
|
margin-right: 5px;
|
||||||
|
width: 120px;
|
||||||
|
height: 40px;
|
||||||
|
font-family: Verdana, Geneva, Tahoma, sans-serif
|
||||||
|
}
|
||||||
|
form input[type="submit"], form input[type="button"] {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
form label{
|
||||||
|
font-size: 20px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-family: Verdana, Geneva, Tahoma, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
body, h1 {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
input[type="text"], input[type="password"], input[type="email"] {
|
||||||
|
width: 350px;
|
||||||
|
height: 25px;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1>Editar Usuario</h1>
|
||||||
|
<form th:action="@{/admin/update_usuario}" th:object="${usuario}" method="post">
|
||||||
|
<input type="hidden" th:field="*{id}" id="userId">
|
||||||
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-sm-3 col-form-label" for="nombreUsuario">Username:</label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="text" th:field="*{nombreUsuario}" id="nombreUsuario" required maxlength="250" class="form-control">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-sm-3 col-form-label" for="nombreLogIn">Login Name:</label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="text" th:field="*{nombreLogIn}" id="nombreLogIn" required maxlength=" 70" class="form-control">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-sm-3 col-form-label" for="email">Email:</label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="email" th:field="*{email}" id="email" required maxlength="100" class="form-control">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-sm-3 col-form-label" for="password">Password:</label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="password" th:field="*{password}" id="password" class="form-control" value="" placeholder="Complete esto solo si desea cambiar la contraseña.">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-sm-3 col-form-label" for="confirmPassword">Confirm Password:</label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="password" id="confirmPassword" required maxlength="60" class="form-control" value="" placeholder=" Confirmar contraseña" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="hidden" th:field="*{rol}" id="rol">
|
||||||
|
|
||||||
|
<div class="text-center">
|
||||||
|
<input type="submit" value="Guardar" class="btn"/>
|
||||||
|
<input type="button" value="Cancelar" id="btnCancelar" class="btn" onclick="goBack()"/>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
function goBack() {
|
||||||
|
window.location.href = "/buscador";
|
||||||
|
}
|
||||||
|
// Log the selected user
|
||||||
|
//console.log('User selected: ' + userId);
|
||||||
|
$(document).ready(function() {
|
||||||
|
var $password = $('#password');
|
||||||
|
var $confirmPassword = $('#confirmPassword');
|
||||||
|
|
||||||
|
$password.on('input', function() {
|
||||||
|
var password = $password.val();
|
||||||
|
|
||||||
|
if (password) {
|
||||||
|
$confirmPassword.prop('disabled', false);
|
||||||
|
} else {
|
||||||
|
$confirmPassword.prop('disabled', true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('form').on('submit', function(e) {
|
||||||
|
var password = $password.val();
|
||||||
|
var confirmPassword = $confirmPassword.val();
|
||||||
|
|
||||||
|
if (password !== confirmPassword) {
|
||||||
|
alert("Las contraseñas no coinciden!");
|
||||||
|
e.preventDefault(); // Prevent form from submitting
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$(document).ready(function() {
|
||||||
|
alert('ES NECESARIO EL CAMBIO DE LA CONTRASEÑA POR SEGURIDAD.');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in new issue