57 lines
1.9 KiB
HTML
57 lines
1.9 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
|
|
xmlns:p="http://primefaces.org/ui" xmlns:o="http://omnifaces.org/ui">
|
|
|
|
<h:head>
|
|
<title>login</title>
|
|
</h:head>
|
|
<h:outputScript>
|
|
<script type="text/javascript">
|
|
function handleLoginRequest(xhr, status, args) {
|
|
if(args.validationFailed || !args.loggedIn) {
|
|
PF('dlg').jq.effect("shake", {times:5}, 100);
|
|
}
|
|
else {
|
|
PF('dlg').hide();
|
|
$('#loginLink').fadeOut();
|
|
}
|
|
}
|
|
</script>
|
|
</h:outputScript>
|
|
<ui:composition template="./header.xhtml">
|
|
<ui:define name="content">
|
|
<h:form>
|
|
<div class="ui-g ui-fluid">
|
|
<div class="ui-g-4 ui-md-4" />
|
|
<div class="ui-g-4 ui-md-4">
|
|
<p:panel id="LoginPanel" header="Acceder al sistema">
|
|
<div class="ui-g ui-fluid">
|
|
<div class="ui-g-12">
|
|
<h:outputLabel for="username" value="Usuario:" />
|
|
<p:inputText id="username" value="#{loginView.username}" />
|
|
</div>
|
|
|
|
<div class="ui-g-12">
|
|
<h:outputLabel for="password" value="Contraseña:" />
|
|
<p:password id="password" value="#{loginView.password}" />
|
|
</div>
|
|
|
|
<div class="ui-g-6">
|
|
<p:commandButton value="Login" update="frmMenu, messages" icon="pi pi-sign-in" action="#{loginView.login}" onstart="startLogin()"
|
|
oncomplete="handleLoginRequest(xhr, status, args)" />
|
|
</div>
|
|
<div class="ui-g-6">
|
|
<p:button value="Volver" outcome="/home" icon="pi pi-home" />
|
|
</div>
|
|
</div>
|
|
</p:panel>
|
|
</div>
|
|
<div class="ui-g-4 ui-md-4" />
|
|
</div>
|
|
</h:form>
|
|
</ui:define>
|
|
</ui:composition>
|
|
</html>
|