maia_modificado/.svn/pristine/f5/f5dbebc7e9baa12b4d49995da22...

183 lines
10 KiB
Plaintext
Executable File

<ui:composition 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:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions">
<h:form id="formPersonDetail">
<h:panelGrid id="data-content" columns="3">
<h:panelGrid id="datos1" columns="3">
<p:outputLabel for="identification" value="#{msg_general.lbl_identificationtype}:"/>
<p:selectOneMenu id="identification" value="#{peopleFastController.persondetail.record.identificationcatalog}" var="p"
style="width:140px" panelStyle="width:140px" required="true">
<f:selectItem itemLabel="" itemValue="#{null}" />
<p:ajax listener="#{peopleFastController.onChangeId()}" event="change" update="identificationnumber"/>
<f:selectItems value="#{peopleFastController.lidentification}" var="id"
itemLabel="#{id.description}" itemValue="#{id.pk.catalog}" />
</p:selectOneMenu>
<p:message for="identification"></p:message>
<p:outputLabel for="firstname" value="Apellidos y nombres:"/>
<p:inputText id="firstname" value="#{peopleFastController.people.record.firstname}"
required="true" maxlength="70" style="width:330px;" onkeyup="Maia.forceupper(event, this);">
</p:inputText>
<p:message for="firstname"></p:message>
<p:outputLabel for="surename" value="#{msg_general.lbl_surname}:" rendered="false"/>
<p:inputText id="surename" value="#{peopleFastController.people.record.surename}" rendered="false"
maxlength="20" style="width:150px;" onkeyup="Maia.forceupper(event, this);">
</p:inputText>
<p:message for="surename" rendered="false"></p:message>
<p:outputLabel for="gender" value="#{msg_general.lbl_gender}:"/>
<p:selectOneMenu id="gender" value="#{peopleFastController.people.record.gender}"
var="p" style="width:140px" panelStyle="width:135px" required="true">
<f:selectItem itemLabel="" itemValue="#{null}" />
<f:selectItems value="#{peopleFastController.lgender}" var="gender"
itemValue="#{gender[0]}" itemLabel="#{gender[1]}"/>
</p:selectOneMenu>
<p:message for="gender"></p:message>
<p:outputLabel for="profesion" value="#{msg_general.lbl_profesion}:"/>
<p:selectOneMenu id="profesion" value="#{peopleFastController.people.record.professioncatalog}"
var="profesion" style="width:330px" panelStyle="width:330px" >
<f:selectItem itemLabel="" itemValue="#{null}" />
<f:selectItems value="#{peopleFastController.profesionList}" var="id"
itemLabel="#{id.description}" itemValue="#{id.pk.catalog}" />
</p:selectOneMenu>
<p:message for="profesion"></p:message>
<p:outputLabel for="grado" value="#{msg_armas.lbl_grado}:"/>
<p:selectOneMenu id="grado" value="#{peopleFastController.persondetail.record.militarygrade}"
var="p" style="width:135px" panelStyle="width:135px" >
<f:selectItem itemLabel="" itemValue="#{null}" />
<f:selectItems value="#{peopleFastController.militarygrades}" var="id"
itemLabel="#{id.description}" itemValue="#{id.pk.catalog}" />
</p:selectOneMenu>
<p:message for="grado"></p:message>
</h:panelGrid>
<p:spacer width="20"></p:spacer>
<h:panelGrid id="datos2" columns="3" >
<p:outputLabel for="identificationnumber" value="#{msg_general.lbl_identification}:" />
<p:inputText id="identificationnumber" value="#{peopleFastController.persondetail.record.identification}" required="true" maxlength="#{peopleFastController.lengthId}"
style="width:150px;" onkeyup="Maia.forceupper(event, this);" disabled="#{peopleFastController.persondetail.record.pk.personcode!=null}">
<pe:keyFilter regEx="/[\d\-]/" rendered="#{!peopleFastController.activeRegEx}"/>
</p:inputText>
<p:message for="identificationnumber"></p:message>
<p:outputLabel for="lastname" value="#{msg_general.lbl_lastname}:" rendered="false" />
<p:inputText id="lastname" value="#{peopleFastController.people.record.lastname}" rendered="false"
required="true" maxlength="20" style="width:150px;" onkeyup="Maia.forceupper(event, this);">
</p:inputText>
<p:message for="lastname" rendered="false"></p:message>
<p:outputLabel for="typeclient" value="#{msg_general.lbl_typeclient}:"/>
<p:selectOneMenu id="typeclient" value="#{peopleFastController.persondetail.record.persontypecatalog}"
var="p" style="width:140px" panelStyle="width:140px" required="true">
<f:selectItem itemLabel="" itemValue="#{null}" />
<f:selectItems value="#{peopleFastController.ltypeclient}" var="id"
itemLabel="#{id.description}" itemValue="#{id.pk.catalog}" />
</p:selectOneMenu>
<p:message for="typeclient"></p:message>
<p:outputLabel for="estadocivil" value="#{msg_general.lbl_estadoCivil}:"/>
<p:selectOneMenu id="estadocivil" value="#{peopleFastController.people.record.maritalstatuscatalog}"
var="estadocivil" style="width:140px" panelStyle="width:140px" >
<f:selectItem itemLabel="" itemValue="#{null}" />
<f:selectItems value="#{peopleFastController.estadocivilList}" var="id"
itemLabel="#{id.description}" itemValue="#{id.pk.catalog}" />
</p:selectOneMenu>
<p:message for="estadocivil"></p:message>
<p:outputLabel for="estatura" value="#{msg_general.lbl_person_height}:"/>
<p:inputText id="estatura" value="#{peopleFastController.people.record.height}"
maxlength="7" style="width:150px;" onkeyup="Maia.forceupper(event, this);">
<f:convertNumber pattern="#0.00" minFractionDigits="2" />
<f:validateDoubleRange minimum="0.00" />
</p:inputText>
<p:message for="estatura"></p:message>
</h:panelGrid>
<h:panelGrid id="foto" columns="1" >
<p:outputLabel for="panelFoto" value="Foto:"/>
<h:panelGrid id="panelFoto" columns="4">
<p:graphicImage width="100" height="100" rendered="#{peopleFastController.fotoCargada}" url="#{peopleFastController.rutaFoto}" />
</h:panelGrid>
<p:commandButton id="btnCargarFoto" value="Seleccionar imagen" oncomplete="PF('dialogFoto').show()" >
<p:ajax event="dialogReturn" update=":formPerson:tabperson:formPersonDetail:panelFoto"/>
</p:commandButton>
</h:panelGrid>
<p:spacer width="20"></p:spacer>
<h:panelGrid id="firma" columns="1">
<p:outputLabel for="panelFirma" value="Firma:"/>
<h:panelGrid id="panelFirma" columns="4">
<p:graphicImage width="100" height="100" rendered="#{peopleFastController.firmaCargada}" url="#{peopleFastController.rutaFirma}" />
</h:panelGrid>
<p:commandButton id="btnCargarFirma" value="Seleccionar imagen" oncomplete="PF('dialogFirma').show()" >
<p:ajax event="dialogReturn" update=":formPerson:tabperson:formPersonDetail:panelFirma"/>
</p:commandButton>
</h:panelGrid>
</h:panelGrid>
</h:form>
<p:dialog widgetVar="dialogFoto" resizable="false" closeOnEscape="true" modal="true" appendTo="@(body)" showEffect="explode" hideEffect="explode"
styleClass="m-dialog" >
<f:facet name="header">
<h:outputText value="Seleccionar Foto" />
</f:facet>
<h:form id="formFoto">
<p:messages id="messages" autoUpdate="true" globalOnly="true"/>
<h:panelGrid id="pEditFoto" columns="2" bodyrows="1">
<p:fileUpload fileUploadListener="#{peopleFastController.uploadPicture}" multiple="false"
update=":formPerson:tabperson:formPersonDetail:panelFoto"
allowTypes="/(\.|\/)(gif|jpe?g|png)$/"
uploadLabel="Cargar Imagen" cancelLabel="#{msg_armas.lbl_cancelar}"
label="#{msg_armas.lbl_seleccionar}" oncomplete="PF('dialogFoto').hide()" invalidFileMessage="#{msg_armas.msg_error_tipoarchivoinvalido}"/>
</h:panelGrid>
<h:panelGrid columns="1" >
<p:commandButton value="#{msg_general.btn_cancell}" oncomplete="PF('dialogFoto').hide()"
icon="ui-icon-trash" process="@this" >
</p:commandButton>
</h:panelGrid>
</h:form>
</p:dialog>
<p:dialog widgetVar="dialogFirma" resizable="false" closeOnEscape="true" modal="true" appendTo="@(body)" showEffect="explode" hideEffect="explode"
styleClass="m-dialog" >
<f:facet name="header">
<h:outputText value="Seleccionar Firma" />
</f:facet>
<h:form id="formFirma">
<p:messages id="messages" autoUpdate="true" globalOnly="true"/>
<h:panelGrid id="pEditFirma" columns="2" bodyrows="1">
<p:fileUpload fileUploadListener="#{peopleFastController.uploadSign}" multiple="false"
update=":formPerson:tabperson:formPersonDetail:panelFirma"
allowTypes="/(\.|\/)(gif|jpe?g|png)$/"
uploadLabel="Cargar Imagen" cancelLabel="#{msg_armas.lbl_cancelar}"
label="#{msg_armas.lbl_seleccionar}" oncomplete="PF('dialogFirma').hide()" invalidFileMessage="#{msg_armas.msg_error_tipoarchivoinvalido}"/>
</h:panelGrid>
<h:panelGrid columns="1" >
<p:commandButton value="#{msg_general.btn_cancell}" oncomplete="PF('dialogFirma').hide()"
icon="ui-icon-trash" process="@this" >
</p:commandButton>
</h:panelGrid>
</h:form>
</p:dialog>
</ui:composition>