* Tema por defecto nova-light
* Interfaz de usuario con Grid-css para pantalla de registro.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<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">
|
||||
<f:metadata>
|
||||
<f:viewParam name="refresh" value="#{specs.refresh}" />
|
||||
<f:viewParam name="refresh" value="#{home.refresh}" />
|
||||
</f:metadata>
|
||||
|
||||
<ui:composition template="./header.xhtml">
|
||||
|
||||
@@ -5,55 +5,42 @@
|
||||
xmlns:p="http://primefaces.org/ui">
|
||||
|
||||
<ui:composition template="../header.xhtml">
|
||||
<ui:define name="content">
|
||||
<h:outputScript>
|
||||
function handleRequest(xhr, status, args) {
|
||||
if(args.specs) {
|
||||
PF('caps').hide();
|
||||
$('#caps').fadeOut();
|
||||
PF('especialidades').show()
|
||||
$('#especialidades').fadeIn();
|
||||
PF('panCentros').hide();
|
||||
$('#panCentros').fadeOut();
|
||||
PF('panEspecialidad').show()
|
||||
$('#panEspecialidad').fadeIn();
|
||||
}
|
||||
else if (args.caps) {
|
||||
PF('especialidades').hide();
|
||||
$('#especialidades').fadeOut();
|
||||
PF('caps').show()
|
||||
$('#caps').fadeIn();
|
||||
PF('panEspecialidad').hide();
|
||||
$('#panEspecialidad').fadeOut();
|
||||
PF('panCentros').show()
|
||||
$('#panCentros').fadeIn();
|
||||
}
|
||||
}
|
||||
</h:outputScript>
|
||||
<ui:define name="content">
|
||||
<h:form>
|
||||
<p:messages id="mesgs" showDetail="true" closable="true" autoupdate="true" />
|
||||
|
||||
<p:panel id="tipoUsuario" header="Especifique el tipo de usuario que desea registrarse">
|
||||
<h:panelGrid columns="2" style="margin-bottom:10px" cellpadding="5">
|
||||
<p:selectOneRadio id="usertype" value="#{registerUser.userType}" unselectable="true" required="true" requiredMessage="Debe especificar un tipo de usuario">
|
||||
<p:ajax listener="#{registerUser.onUserTypeChange}" update="medicalSpecialty" oncomplete="handleRequest(xhr, status, args)" />
|
||||
<p:selectOneButton id="selUsertype" value="#{registerUser.userType}" required="true" requiredMessage="Debe especificar un tipo de usuario">
|
||||
<f:selectItems value="#{registerUser.userTypes}" />
|
||||
</p:selectOneRadio>
|
||||
<p:ajax listener="#{registerUser.onUserTypeChange}" update="medicalSpecialty" oncomplete="handleRequest(xhr, status, args)" />
|
||||
</p:selectOneButton>
|
||||
</h:panelGrid>
|
||||
</p:panel>
|
||||
<p:panel id="RegisterUser" header="Registrarse en el sistema como paciente">
|
||||
<h:panelGrid columns="3">
|
||||
<p:panel id="RegisterUser" header="Datos personales para el usuario">
|
||||
<div class="ui-fluid">
|
||||
<h:panelGrid columns="3" layout="grid" columnClasses="p-col-12 p-md-3 p-xl-2, p-col-12 p-md-9 p-xl-4, p-col-12 p-md-3 p-xl-2, p-col-12 p-md-9 p-xl-4"
|
||||
contentStyleClass="ui-fluid">
|
||||
<p:outputLabel value="NIF:" for="nif" />
|
||||
<p:inputText id="nif" value="#{registerUser.nif}" required="true" requiredMessage="Por favor, indque su NIF" />
|
||||
<p:message for="nif" display="text" />
|
||||
|
||||
<p:outputLabel value="Especialidad médica:" for="medicalSpecialty" />
|
||||
<p:selectOneMenu id="medicalSpecialty" value="#{registerUser.medicalSpecialty}" style="width:350px">
|
||||
<f:selectItem itemLabel="Seleccione una especialidad médica..." itemValue="" noSelectionOption="true" />
|
||||
<f:selectItems value="#{registerUser.medicalSpecialties}" var="c" itemDescription="#{c.description}" itemValue="#{c.name}" />
|
||||
</p:selectOneMenu>
|
||||
<p:message for="medicalSpecialty" />
|
||||
|
||||
<p:outputLabel value="Centro:" for="primaryHealthCareCenter" />
|
||||
<p:selectOneMenu id="primaryHealthCareCenter" value="#{registerUser.medicalSpecialty}" style="width:350px">
|
||||
<f:selectItem itemLabel="Seleccione una centro..." itemValue="" noSelectionOption="true" />
|
||||
<f:selectItems value="#{registerUser.medicalSpecialties}" var="c" itemDescription="#{c.description}" itemValue="#{c.name}" />
|
||||
</p:selectOneMenu>
|
||||
<p:message for="primaryHealthCareCenter" />
|
||||
|
||||
|
||||
<p:outputLabel value="Nombre:" for="name" />
|
||||
<p:inputText id="name" value="#{registerUser.name}" required="true" requiredMessage="Por favor, indique su nombre" />
|
||||
<p:message for="name" />
|
||||
@@ -62,6 +49,21 @@
|
||||
<p:inputText id="surname" value="#{registerUser.surname}" required="true" requiredMessage="Por favor, indique sus apellidos" />
|
||||
<p:message for="surname" />
|
||||
|
||||
<p:outputLabel value="Especialidad médica:" for="medicalSpecialty" />
|
||||
<p:selectOneMenu id="medicalSpecialty" value="#{registerUser.medicalSpecialty}" style="width:350px">
|
||||
<f:selectItem itemLabel="Seleccione una especialidad médica..." itemValue="" noSelectionOption="true" />
|
||||
<f:selectItems value="#{registerUser.medicalSpecialties}" var="c.TO" itemDescription="#{c.description}" itemValue="#{c.name}" />
|
||||
</p:selectOneMenu>
|
||||
|
||||
|
||||
<p:message for="medicalSpecialty" />
|
||||
<p:outputLabel value="Centro:" for="primaryHealthCareCenter" />
|
||||
<p:selectOneMenu id="primaryHealthCareCenter" value="#{registerUser.medicalSpecialty}" style="width:350px">
|
||||
<f:selectItem itemLabel="Seleccione un centro de antención primario..." itemValue="" noSelectionOption="true" />
|
||||
<f:selectItems value="#{registerUser.medicalSpecialties}" var="c" itemDescription="#{c.description}" itemValue="#{c.name}" />
|
||||
</p:selectOneMenu>
|
||||
<p:message for="primaryHealthCareCenter" />
|
||||
|
||||
<p:outputLabel value="Correo electrónico:" for="email" />
|
||||
<p:inputText id="email" value="#{registerUser.email}" required="true" requiredMessage="Por favor, especifique su correo electrónico" />
|
||||
<p:message for="email" />
|
||||
@@ -75,13 +77,17 @@
|
||||
<p:outputLabel value="Verificación de contraseña:" for="passwordRepeat" />
|
||||
<p:password id="passwordRepeat" value="#{registerUser.password}" required="true" requiredMessage="Por favor, escriba la verificación de su contraseña" maxlength="50" />
|
||||
<p:message for="passwordRepeat" />
|
||||
|
||||
|
||||
|
||||
</h:panelGrid>
|
||||
<h:panelGroup>
|
||||
<h:panelGrid columns="3">
|
||||
<p:commandButton validateClient="true" value="Registrarse" update="mesgs" action="#{registerUser.addNewUser}" icon="pi pi-check" />
|
||||
<p:commandButton value="Volver" outcome="home" />
|
||||
<h:panelGrid columns="3" layout="grid" columnClasses="p-col-12 p-md-3 p-xl-2, p-col-12 p-md-9 p-xl-4, p-col-12 p-md-3 p-xl-2, p-col-12 p-md-9 p-xl-4">
|
||||
<p:commandButton type="button" validateClient="true" value="Registrarse" update="mesgs" action="#{registerUser.addNewUser}" icon="pi pi-check" />
|
||||
<p:commandButton type="button" value="Volver" outcome="home" />
|
||||
|
||||
</h:panelGrid>
|
||||
</h:panelGroup>
|
||||
|
||||
</div>
|
||||
</p:panel>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -18,7 +18,7 @@ public class SessionPreferences implements Serializable {
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String currentTheme = "pepper-grinder";
|
||||
private String currentTheme = "nova-light";
|
||||
|
||||
public SessionPreferences() {
|
||||
}
|
||||
|
||||
@@ -9,45 +9,48 @@ public class ThemeService {
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final String DEFAULT_THEME = "aristo";
|
||||
public static final String DEFAULT_THEME = "nova-light";
|
||||
public static final List<Theme> THEMES = new ArrayList<Theme>() {
|
||||
{
|
||||
add(new Theme(1, "afterdark", "afterdark"));
|
||||
add(new Theme(2, "afternoon", "afternoon"));
|
||||
add(new Theme(3, "afterwork", "afterwork"));
|
||||
add(new Theme(4, "black-tie", "black-tie"));
|
||||
add(new Theme(5, "blitzer", "blitzer"));
|
||||
add(new Theme(6, "bluesky", "bluesky"));
|
||||
add(new Theme(7, "bootstrap", "bootstrap"));
|
||||
add(new Theme(8, "casablanca", "casablanca"));
|
||||
add(new Theme(9, "cruze", "cruze"));
|
||||
add(new Theme(10, "cupertino", "cupertino"));
|
||||
add(new Theme(11, "dark-hive", "dark-hive"));
|
||||
add(new Theme(12, "dot-luv", "dot-luv"));
|
||||
add(new Theme(13, "eggplant", "eggplant"));
|
||||
add(new Theme(14, "excite-bike", "excite-bike"));
|
||||
add(new Theme(15, "flick", "flick"));
|
||||
add(new Theme(16, "glass-x", "glass-x"));
|
||||
add(new Theme(17, "home", "home"));
|
||||
add(new Theme(18, "hot-sneaks", "hot-sneaks"));
|
||||
add(new Theme(19, "humanity", "humanity"));
|
||||
add(new Theme(20, "le-frog", "le-frog"));
|
||||
add(new Theme(21, "midnight", "midnight"));
|
||||
add(new Theme(22, "mint-choc", "mint-choc"));
|
||||
add(new Theme(23, "overcast", "overcast"));
|
||||
add(new Theme(24, "pepper-grinder", "pepper-grinder"));
|
||||
add(new Theme(25, "redmond", "redmond"));
|
||||
add(new Theme(26, "rocket", "rocket"));
|
||||
add(new Theme(27, "sam", "sam"));
|
||||
add(new Theme(28, "smoothness", "smoothness"));
|
||||
add(new Theme(29, "south-street", "south-street"));
|
||||
add(new Theme(30, "start", "start"));
|
||||
add(new Theme(31, "sunny", "sunny"));
|
||||
add(new Theme(32, "swanky-purse", "swanky-purse"));
|
||||
add(new Theme(33, "trontastic", "trontastic"));
|
||||
add(new Theme(34, "ui-darkness", "ui-darkness"));
|
||||
add(new Theme(35, "ui-lightness", "ui-lightness"));
|
||||
add(new Theme(36, "vader", "vader"));
|
||||
int i = 1;
|
||||
add(new Theme(i++, "afterdark", "afterdark"));
|
||||
add(new Theme(i++, "afternoon", "afternoon"));
|
||||
add(new Theme(i++, "afterwork", "afterwork"));
|
||||
add(new Theme(i++, "aristo", "aristo"));
|
||||
add(new Theme(i++, "black-tie", "black-tie"));
|
||||
add(new Theme(i++, "blitzer", "blitzer"));
|
||||
add(new Theme(i++, "bluesky", "bluesky"));
|
||||
add(new Theme(i++, "bootstrap", "bootstrap"));
|
||||
add(new Theme(i++, "casablanca", "casablanca"));
|
||||
add(new Theme(i++, "cruze", "cruze"));
|
||||
add(new Theme(i++, "cupertino", "cupertino"));
|
||||
add(new Theme(i++, "dark-hive", "dark-hive"));
|
||||
add(new Theme(i++, "dot-luv", "dot-luv"));
|
||||
add(new Theme(i++, "eggplant", "eggplant"));
|
||||
add(new Theme(i++, "excite-bike", "excite-bike"));
|
||||
add(new Theme(i++, "flick", "flick"));
|
||||
add(new Theme(i++, "glass-x", "glass-x"));
|
||||
add(new Theme(i++, "home", "home"));
|
||||
add(new Theme(i++, "hot-sneaks", "hot-sneaks"));
|
||||
add(new Theme(i++, "humanity", "humanity"));
|
||||
add(new Theme(i++, "le-frog", "le-frog"));
|
||||
add(new Theme(i++, "midnight", "midnight"));
|
||||
add(new Theme(i++, "mint-choc", "mint-choc"));
|
||||
add(new Theme(i++, "nova-light", "nova-light"));
|
||||
add(new Theme(i++, "overcast", "overcast"));
|
||||
add(new Theme(i++, "pepper-grinder", "pepper-grinder"));
|
||||
add(new Theme(i++, "redmond", "redmond"));
|
||||
add(new Theme(i++, "rocket", "rocket"));
|
||||
add(new Theme(i++, "sam", "sam"));
|
||||
add(new Theme(i++, "smoothness", "smoothness"));
|
||||
add(new Theme(i++, "south-street", "south-street"));
|
||||
add(new Theme(i++, "start", "start"));
|
||||
add(new Theme(i++, "sunny", "sunny"));
|
||||
add(new Theme(i++, "swanky-purse", "swanky-purse"));
|
||||
add(new Theme(i++, "trontastic", "trontastic"));
|
||||
add(new Theme(i++, "ui-darkness", "ui-darkness"));
|
||||
add(new Theme(i++, "ui-lightness", "ui-lightness"));
|
||||
add(new Theme(i++, "vader", "vader"));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ public class homeMBean implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private boolean isLogedIn;
|
||||
private int refresh;
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
@@ -46,4 +47,12 @@ public class homeMBean implements Serializable {
|
||||
return SessionUtils.getUserId();
|
||||
}
|
||||
|
||||
public int getRefresh() {
|
||||
return refresh;
|
||||
}
|
||||
|
||||
public void setRefresh(int refresh) {
|
||||
this.refresh = refresh;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import java.util.Properties;
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.faces.application.FacesMessage;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.inject.Named;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
@@ -68,7 +67,7 @@ public class RegisterUserMBean extends ProfileMBeanBase implements Serializable
|
||||
this.userTypes.put(UserType.PATIENT.getUserTypename(), UserType.PATIENT.name());
|
||||
this.userTypes.put(UserType.FAMILY_DOCTOR.getUserTypename(), UserType.FAMILY_DOCTOR.name());
|
||||
this.userTypes.put(UserType.SPECIALIST_DOCTOR.getUserTypename(), UserType.SPECIALIST_DOCTOR.name());
|
||||
this.userType = "patient";
|
||||
this.userType = UserType.PATIENT.getUserTypename();
|
||||
|
||||
}
|
||||
|
||||
@@ -209,12 +208,20 @@ public class RegisterUserMBean extends ProfileMBeanBase implements Serializable
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
public String getmedicalSpecialty() {
|
||||
public String getMedicalSpecialty() {
|
||||
return medicalSpecialty;
|
||||
}
|
||||
|
||||
public void setmedicalSpecialty(String medicalSpecialty) {
|
||||
public void setMedicalSpecialty(String medicalSpecialty) {
|
||||
this.medicalSpecialty = medicalSpecialty;
|
||||
}
|
||||
|
||||
public String getPrimaryHealthCareCenter() {
|
||||
return primaryHealthCareCenter;
|
||||
}
|
||||
|
||||
public void setPrimaryHealthCareCenter(String primaryHealthCareCenter) {
|
||||
this.primaryHealthCareCenter = primaryHealthCareCenter;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user