You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
2.4 KiB
66 lines
2.4 KiB
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
|
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
|
xmlns:f="http://xmlns.jcp.org/jsf/core"
|
|
xmlns:p="http://primefaces.org/ui">
|
|
<h:head>
|
|
<title>Inicio de sesión</title>
|
|
<h:outputStylesheet library="css" name="styles.css" />
|
|
<script>
|
|
// Deshabilitar la navegación hacia atrás
|
|
history.pushState(null, null, document.URL);
|
|
window.addEventListener('popstate', function () {
|
|
history.pushState(null, null, document.URL);
|
|
});
|
|
|
|
// Deshabilitar la navegación hacia adelante
|
|
window.addEventListener('load', function () {
|
|
if (window.history.forward(1) !== null) {
|
|
window.history.forward(1);
|
|
}
|
|
});
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
body {
|
|
background-image: url('../resources/css/images/fondoLogin3.png');
|
|
background-size: auto;
|
|
background-position: center;
|
|
background-repeat: no-repeat;
|
|
font-family: Arial, sans-serif; /* Cambia la fuente según necesites */
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
</style>
|
|
|
|
</h:head>
|
|
<h:body>
|
|
<h:form id="loginForm">
|
|
<f:metadata>
|
|
<f:viewAction action="#{demoBeanLogin.handleViewExpiredException}" />
|
|
</f:metadata>
|
|
<p:growl id="growl" showDetail="true" />
|
|
<h2 style="margin-bottom: 40px;">Iniciar sesión</h2>
|
|
<h:panelGrid columns="2" id="loginPanel">
|
|
<p:outputLabel for="username" value="Usuario:" />
|
|
<p:inputText id="username" value="#{demoBeanLogin.username}" style="margin-bottom: 20px" title="Usuario" required="true" validatorMessage="El número 0 es inválido" >
|
|
<f:validateLength minimum="1" maximum="100" />
|
|
</p:inputText>
|
|
|
|
|
|
|
|
<p:outputLabel for="password" value="Contraseña:" />
|
|
<p:password id="password" value="#{demoBeanLogin.password}" title="Contraseña" style="margin-bottom: 20px" required="true" validatorMessage="El número 0 es inválido">
|
|
<f:validateLength minimum="1" maximum="100" />
|
|
</p:password>
|
|
<div>
|
|
<h:commandButton value="Iniciar sesión" action="#{demoBeanLogin.buscarPorLogin}" style="margin-top: 40px; width: 100%"/>
|
|
</div>
|
|
<p:message for="loginForm" id="errorMessage" />
|
|
</h:panelGrid>
|
|
</h:form>
|
|
</h:body>
|
|
</html>
|
|
|