227 lines
16 KiB
HTML
227 lines
16 KiB
HTML
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns:h="http://java.sun.com/jsf/html"
|
|
xmlns:f="http://java.sun.com/jsf/core"
|
|
xmlns:ui="http://java.sun.com/jsf/facelets"
|
|
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
|
|
xmlns:p="http://primefaces.org/ui"
|
|
xmlns:pe="http://primefaces.org/ui/extensions"
|
|
template="/WEB-INF/templates/template.xhtml">
|
|
<ui:param name="idForm" value="frmRegistro" />
|
|
<ui:param name="controller" value="#{registroController}" />
|
|
<ui:define name="content">
|
|
<h:panelGroup layout="block">
|
|
<h:outputText value="#{msg_portal['lbl_requeridos']}" style="color:red;"/>
|
|
</h:panelGroup>
|
|
<p:fieldset legend="#{msg_portal['lbl_registro_usuario']}">
|
|
<h:panelGroup layout="block" style="margin:auto;">
|
|
<h:panelGrid columns="2">
|
|
<h:panelGrid columns="3" id="pnlRegistro">
|
|
<p:outputLabel for="selTipoDocumento" value="#{msg_portal['lbl_tipo_documento']}" style="width:150px"/>
|
|
<p:selectOneMenu id="selTipoDocumento" required="true" value="#{registroDataManager.persona.identificationcatalog}">
|
|
<f:selectItem itemLabel="" itemValue="#{null}"/>
|
|
<f:selectItems value="#{registroDataManager.tipoDocumentoColl}" var="tipoDoc" itemLabel="#{tipoDoc.description}" itemValue="#{tipoDoc.id.catalog}"/>
|
|
<p:ajax event="change" listener="#{registroController.changeTipoIdentificacion}" process="@this" update="txtNumeroDocumento pnlRuc pnlCedula pnlRepresentanteLegal pnlLogo pnlactividadeco :frmRegistro:pnlestatura"/>
|
|
</p:selectOneMenu>
|
|
<p:message for="selTipoDocumento" />
|
|
|
|
<p:outputLabel for="txtNumeroDocumento" value="#{msg_portal['lbl_numero_documento']}" style="width:150px"/>
|
|
<p:inputText id="txtNumeroDocumento" maxlength="#{registroDataManager.tamDocIndentificacion}"
|
|
required="true" value="#{registroDataManager.persona.identification}" onkeyup="comaco.upperText(event, this);"
|
|
onkeypress="if(event.keyCode==13){onchange(); return false;}">
|
|
<f:validateLength for="txtNumeroDocumento" maximum="#{registroDataManager.tamDocIndentificacion}"/>
|
|
<f:validator for="txtNumeroDocumento" validatorId="identificacionValidator"/>
|
|
<pe:keyFilter mask="#{registroDataManager.tipoMascaraIdentificacion}" for="txtNumeroDocumento"/>
|
|
<p:ajax event="change" listener="#{registroController.changeIdentificacion}" process="@this :frmRegistro:selTipoDocumento" update=":frmRegistro:pNumeroDocumento :frmRegistro:fpnlDatosGenerales :frmRegistro:pnlValidacion :frmRegistro:pnlactividadeco gLogo"/>
|
|
</p:inputText>
|
|
<p:message id="pNumeroDocumento" for="txtNumeroDocumento" />
|
|
</h:panelGrid>
|
|
<h:panelGroup layout="block" id="pnlLogo">
|
|
<p:outputLabel value="#{msg_portal['lbl_logo']}" style="width:150px; display:block;" rendered="#{registroDataManager.persona.identificationcatalog == 'RUC'}"/>
|
|
<h:panelGroup layout="block" id="gLogo">
|
|
<p:graphicImage height="100" width="75" value="#{registroDataManager.contenidoFoto}" cache="false" rendered="#{registroDataManager.persona.identificationcatalog == 'RUC'}"/>
|
|
</h:panelGroup>
|
|
<p:fileUpload mode="advanced"
|
|
allowTypes="/(\.|\/)(gif|jpe?g|png)$/"
|
|
uploadLabel="Subir"
|
|
label="Seleccionar"
|
|
cancelLabel="Cancelar"
|
|
sizeLimit="1048576"
|
|
process="@this"
|
|
update="gLogo"
|
|
fileUploadListener="#{registroController.uploadFoto}"
|
|
rendered="#{registroDataManager.persona.identificationcatalog == 'RUC'}"/>
|
|
</h:panelGroup>
|
|
</h:panelGrid>
|
|
</h:panelGroup>
|
|
</p:fieldset>
|
|
<h:panelGroup id="fpnlDatosGenerales">
|
|
<p:fieldset legend="#{msg_portal['lbl_datos_generales']}" >
|
|
<h:panelGroup layout="block">
|
|
<h:panelGroup layout="block" id="pnlRuc">
|
|
<h:panelGrid columns="3" rendered="#{!empty registroDataManager.persona.identificationcatalog and registroDataManager.persona.identificationcatalog == 'RUC'}">
|
|
<p:outputLabel for="txtNombreRazon" value="#{msg_portal['lbl_nombre_razon']}" style="width:150px; display:block;"/>
|
|
<p:inputText id="txtNombreRazon" value="#{registroDataManager.persona.name}" disabled="false" style="width:400px;" onkeyup="comaco.upperText(event, this);"/>
|
|
<p:message for="txtNombreRazon" display="icon"/>
|
|
</h:panelGrid>
|
|
</h:panelGroup>
|
|
<h:panelGroup layout="block" id="pnlCedula">
|
|
<h:panelGrid columns="3" rendered="#{!empty registroDataManager.persona.identificationcatalog and (registroDataManager.persona.identificationcatalog == 'CED' or registroDataManager.persona.identificationcatalog == 'PAS')}">
|
|
<p:outputLabel for="txtNombrePersona" value="#{msg_portal['lbl_nombre_completo']}" style="width:150px; display:block;"/>
|
|
<p:inputText id="txtNombrePersona" value="#{registroDataManager.adicionalPersona.firstname}" disabled="false" style="width: 300px;" onkeyup="comaco.upperText(event, this);"/>
|
|
<p:message for="txtNombrePersona" display="icon"/>
|
|
|
|
<p:outputLabel for="txtApellidoPaterno" value="#{msg_portal['lbl_apellido_paterno']}" style="width:150px; display:block;" rendered="false"/>
|
|
<p:inputText id="txtApellidoPaterno" value="#{registroDataManager.adicionalPersona.lastname}" rendered="false" disabled="false" style="width: 300px;" onkeyup="comaco.upperText(event, this);"/>
|
|
<p:message for="txtApellidoPaterno" display="icon" rendered="false"/>
|
|
|
|
<p:outputLabel for="txtApellidoMaterno" value="#{msg_portal['lbl_apellido_materno']}" style="width:150px; display:block;" rendered="false"/>
|
|
<p:inputText id="txtApellidoMaterno" value="#{registroDataManager.adicionalPersona.surename}" rendered="false" disabled="false" style="width: 300px;" onkeyup="comaco.upperText(event, this);"/>
|
|
<p:message for="txtApellidoMaterno" display="icon" rendered="false"/>
|
|
</h:panelGrid>
|
|
</h:panelGroup>
|
|
<h:panelGroup layout="block" id="pnlactividadeco">
|
|
<h:panelGrid columns="3" rendered="#{!empty registroDataManager.persona.identificationcatalog and registroDataManager.persona.identificationcatalog == 'RUC'}">
|
|
<p:outputLabel for="txtActividadEconomica" value="#{msg_portal['lbl_actividad_economica']}" style="width:150px;display:block;"/>
|
|
<p:inputTextarea id="txtActividadEconomica" value="#{registroDataManager.persona.econimicact}" disabled="false" onkeyup="comaco.upperText(event, this);" rows="3" cols="80" autoResize="true"/>
|
|
<p:message for="txtActividadEconomica" display="icon"/>
|
|
</h:panelGrid>
|
|
</h:panelGroup>
|
|
<h:panelGroup layout="block" id="pnlRepresentanteLegal">
|
|
<h:panelGrid columns="3" rendered="#{!empty registroDataManager.persona.identificationcatalog and registroDataManager.persona.identificationcatalog == 'RUC'}">
|
|
<p:outputLabel for="txtCedulaRepresentante" value="#{msg_portal['lbl_cedula_representante']}" style="width:150px;display:block;"/>
|
|
<p:inputText id="txtCedulaRepresentante" value="#{registroDataManager.persona.legalrepresentidentification}" maxlength="10" disabled="false">
|
|
<f:validator for="txtNumeroDocumento" validatorId="identificacionValidator"/>
|
|
<pe:keyFilter for="txtCedulaRepresentante" mask="pint"/>
|
|
</p:inputText>
|
|
<p:message for="txtCedulaRepresentante" display="icon"/>
|
|
|
|
<p:outputLabel for="txtRepresentante" value="#{msg_portal['lbl_representate_legal']}" style="width:150px;display:block;"/>
|
|
<p:inputText id="txtRepresentante" disabled="false" value="#{registroDataManager.persona.legalrepresent}" style="width: 400px;" onkeyup="comaco.upperText(event, this);"/>
|
|
<p:message for="txtRepresentante" display="icon"/>
|
|
</h:panelGrid>
|
|
</h:panelGroup>
|
|
<h:panelGrid columns="3">
|
|
<p:outputLabel for="selPaisOrigen" value="#{msg_portal['lbl_pais_origen']}" style="width:150px;display: block;"/>
|
|
<p:selectOneMenu id="selPaisOrigen" required="true" value="#{registroDataManager.direccionPersona.countryCode}" style="width:250px">
|
|
<f:selectItem itemLabel="" itemValue="#{null}"/>
|
|
<f:selectItems value="#{registroDataManager.paisesColl}" var="pais" itemLabel="#{pais.description}" itemValue="#{pais.countrycode}"/>
|
|
<p:ajax event="change" listener="#{registroController.cambiaPais}" process="@this" update="pnlLugar"/>
|
|
</p:selectOneMenu>
|
|
<p:message for="selPaisOrigen" display="icon"/>
|
|
</h:panelGrid>
|
|
<h:panelGrid columns="6" id="pnlLugar">
|
|
<p:outputLabel for="selProvincia" value="#{msg_portal['lbl_provincia']}" style="width:150px;display: block;"/>
|
|
<p:selectOneMenu id="selProvincia" required="true" value="#{registroDataManager.direccionPersona.provinceCode}" style="width:250px">
|
|
<f:selectItem itemLabel="" itemValue="#{null}"/>
|
|
<f:selectItems value="#{registroDataManager.provinciasColl}" var="provincia" itemLabel="#{provincia.description}" itemValue="#{provincia.id.provincecode}"/>
|
|
<p:ajax event="change" listener="#{registroController.cambiaProvincia}" process="@this selPaisOrigen" update="pnlLugar"/>
|
|
</p:selectOneMenu>
|
|
<p:message for="selProvincia" display="icon"/>
|
|
|
|
<p:outputLabel for="selCanton" value="#{msg_portal['lbl_canton']}" />
|
|
<p:selectOneMenu id="selCanton" value="#{registroDataManager.direccionPersona.cantonCode}" required="true" style="width:250px">
|
|
<f:selectItem itemLabel="" itemValue="#{null}"/>
|
|
<f:selectItems value="#{registroDataManager.cantonColl}" var="canton" itemLabel="#{canton.description}" itemValue="#{canton.id.cantoncode}"/>
|
|
<p:ajax event="change" listener="#{registroController.cambiaCanton}" process="@this selPaisOrigen selProvincia" update="pnlLugar"/>
|
|
</p:selectOneMenu>
|
|
<p:message for="selCanton" display="icon"/>
|
|
|
|
<p:outputLabel for="selCiudad" value="#{msg_portal['lbl_ciudad']}"/>
|
|
<p:selectOneMenu id="selCiudad" required="true" style="width:250px" value="#{registroDataManager.direccionPersona.cityCode}">
|
|
<f:selectItem itemLabel="" itemValue="#{null}"/>
|
|
<f:selectItems value="#{registroDataManager.ciudadColl}" var="ciudad" itemLabel="#{ciudad.description}" itemValue="#{ciudad.id.citycode}"/>
|
|
</p:selectOneMenu>
|
|
<p:message for="selCiudad" display="icon"/>
|
|
|
|
<p:outputLabel for="selParroquia" value="#{msg_portal['lbl_parroquia']}" style="width:150px"/>
|
|
<p:selectOneMenu id="selParroquia" value="#{registroDataManager.direccionPersona.parroquiaCode}" required="true" style="width:250px">
|
|
<f:selectItem itemLabel="" itemValue="#{null}"/>
|
|
<f:selectItems value="#{registroDataManager.parroquiaColl}" var="parroquia" itemLabel="#{parroquia.description}" itemValue="#{parroquia.id.parroquiacode}"/>
|
|
</p:selectOneMenu>
|
|
<p:message for="selParroquia" display="icon"/>
|
|
</h:panelGrid>
|
|
<h:panelGrid columns="3">
|
|
<p:outputLabel for="txtDireccion" value="#{msg_portal['lbl_direccion']}" style="width:150px;display: block;"/>
|
|
<p:inputText id="txtDireccion" value="#{registroDataManager.direccionPersona.address}" required="true" onkeyup="comaco.upperText(event, this);" style="width:450px;"/>
|
|
<p:message for="txtDireccion" display="icon"/>
|
|
</h:panelGrid>
|
|
<h:panelGrid columns="6">
|
|
<p:outputLabel for="txtTelfConvencional" value="#{msg_portal['lbl_telf_convencional']}" style="width:150px;display: block;"/>
|
|
<p:inputMask id="txtTelfConvencional" value="#{registroDataManager.telefonoPersona.phonenumber}" required="true" mask="99-9999999"/>
|
|
<p:message for="txtTelfConvencional" display="icon"/>
|
|
|
|
<p:outputLabel for="txtCelular" value="#{msg_portal['lbl_telf_celular']}"/>
|
|
<p:inputText id="txtCelular" value="#{registroDataManager.telefonoCelular.phonenumber}" required="true" maxlength="10">
|
|
<f:validator for="txtCelular" validatorId="celularValidator"/>
|
|
<pe:keyFilter for="txtCelular" mask="pint" />
|
|
</p:inputText>
|
|
<p:message for="txtCelular" display="icon"/>
|
|
|
|
<p:outputLabel for="txtEstadoCivil" value="#{msg_portal['lbl_estado_civil']}" style="width:150px;display: block;"/>
|
|
<p:selectOneMenu id="txtEstadoCivil" value="#{registroDataManager.adicionalPersona.maritalstatuscatalog}">
|
|
<f:selectItem itemLabel="" itemValue="#{null}"/>
|
|
<f:selectItems value="#{registroDataManager.estadoCivilColl}" var="estadoCivil" itemLabel="#{estadoCivil.description}" itemValue="#{estadoCivil.id.catalog}"/>
|
|
</p:selectOneMenu>
|
|
<!--<p:inputText id="txtEstadoCivil" value="#{registroDataManager.cedulaSnap.estadoCivil}" disabled="false"/> -->
|
|
<p:message for="txtEstadoCivil" display="icon"/>
|
|
|
|
<p:outputLabel for="selGenero" value="#{msg_portal['lbl_genero']}"/>
|
|
<p:selectOneMenu id="selGenero" value="#{registroDataManager.adicionalPersona.gender}">
|
|
<f:selectItem itemLabel="" itemValue="#{null}"/>
|
|
<f:selectItem itemLabel="#{fn:toUpperCase(msg_portal['lbl_femenino'])}" itemValue="F"/>
|
|
<f:selectItem itemLabel="#{fn:toUpperCase(msg_portal['lbl_masculino'])}" itemValue="M"/>
|
|
</p:selectOneMenu>
|
|
|
|
<!--
|
|
<p:inputText id="selGenero" value="#{registroDataManager.cedulaSnap.genero}" disabled="false"/>
|
|
-->
|
|
<p:message for="selGenero" display="icon"/>
|
|
|
|
<p:outputLabel for="selProfesion" value="#{msg_portal['lbl_profesion']}" />
|
|
<p:selectOneMenu id="selProfesion" value="#{registroDataManager.adicionalPersona.professioncatalog}" onkeyup="comaco.upperText(event, this);">
|
|
<f:selectItem itemLabel="" itemValue="#{null}"/>
|
|
<f:selectItems value="#{registroDataManager.profesionColl}" var="profesion" itemLabel="#{profesion.description}" itemValue="#{profesion.id.catalog}"/>
|
|
</p:selectOneMenu>
|
|
|
|
<!-- <p:inputText id="selProfesion" value="#{registroDataManager.cedulaSnap.profesion}" disabled="false" style="width: 200px;"/>
|
|
-->
|
|
<p:message for="selProfesion" display="icon"/>
|
|
</h:panelGrid>
|
|
<h:panelGroup layout="block" id="pnlestatura">
|
|
<h:panelGrid columns="3" style="width:308px" rendered="#{!empty registroDataManager.persona.identificationcatalog and registroDataManager.persona.identificationcatalog != 'RUC'}">
|
|
<p:outputLabel for="txtEstatura" value="#{msg_portal['lbl_estatura']}" style="width:250px" rendered="#{!empty registroDataManager.persona.identificationcatalog and registroDataManager.persona.identificationcatalog != 'RUC'}"/>
|
|
<pe:inputNumber id="txtEstatura" value="#{registroDataManager.adicionalPersona.height}" style="width: 50px;" decimalSeparator="." thousandSeparator="," maxValue="2.50" decimalPlaces="2" rendered="#{!empty registroDataManager.persona.identificationcatalog and registroDataManager.persona.identificationcatalog != 'RUC'}"/>
|
|
<p:message for="txtEstatura" display="icon"/>
|
|
</h:panelGrid>
|
|
</h:panelGroup>
|
|
<h:panelGroup style="margin:auto;" layout="block">
|
|
<h:panelGrid columns="3">
|
|
<p:outputLabel for="txtEmail" value="#{msg_portal['lbl_email']}" style="width:150px;display: block;"/>
|
|
<p:inputText id="txtEmail" value="#{registroDataManager.correoPersona.address}" required="true" style="width: 300px;"
|
|
disabled="#{registroDataManager.correoPersona.address!=null}">
|
|
<f:validator for="txtEmail" validatorId="emailValidator"/>
|
|
</p:inputText>
|
|
<p:message for="txtEmail" display="icon"/>
|
|
</h:panelGrid>
|
|
</h:panelGroup>
|
|
</h:panelGroup>
|
|
</p:fieldset>
|
|
</h:panelGroup>
|
|
<h:panelGroup layout="block">
|
|
<h:panelGroup layout="block">
|
|
<h:panelGrid columns="2">
|
|
<!-- <p:captcha id="valcaptcha" theme="white" language="es" requiredMessage="#{msg_portal['error_captcha']}" validatorMessage="#{msg_portal['error_valor_captcha']}"/>
|
|
<p:message for="valcaptcha"/> -->
|
|
</h:panelGrid>
|
|
<h:panelGroup layout="block" style="width: 100%;margin:auto;" id="pnlValidacion">
|
|
<p:commandButton value="#{msg_portal['lbl_aceptar']}"
|
|
ajax="false" disabled="#{!registroController.isEnableSave}"
|
|
process=":frmRegistro:pnlRegistro :frmRegistro:fpnlDatosGenerales"
|
|
update=":frmRegistro:pnlRegistro :frmRegistro:fpnlDatosGenerales"
|
|
action="#{registroController.guardarUsuario}" />
|
|
<p:commandButton ajax="false" value="#{msg_portal['lbl_cancelar']}" immediate="true" action="#{registroController.cancelarOperacion}"/>
|
|
</h:panelGroup>
|
|
</h:panelGroup>
|
|
</h:panelGroup>
|
|
</ui:define>
|
|
</ui:composition> |