Commit 2fe28fb6 by Petri Järvisalo

template sätöstelyä

1 parent cb03c4fb
......@@ -93,7 +93,7 @@
<div id="left">
<ui:insert name="title" />
<h:messages globalOnly="true" />
<p:messages globalOnly="true" severity="info" />
<ui:repeat var="cont1" value="#{menuView.getPagecontent('top')}">
<h:outputText value="#{cont1.content}" escape="false" />
</ui:repeat>
......
......@@ -16,61 +16,63 @@
<composite:implementation>
<h:outputScript library="primefaces" name="jquery/jquery.js" target="head" />
<h2>
<!-- <h2>
<h:outputText rendered="#{!cc.attrs.creating}" disabled="#{!cc.attrs.creating and !userView.canSave}" id="viewlogin" value="#{userView.selectedUser.login}" />
</h2>
<h:message rendered="#{!cc.attrs.creating}" for="viewlogin" />
<h:message rendered="#{sessionHandler.superadmin}" for="superadmin" />
-->
<h:form id="userform" enctype="multipart/form-data" styleClass="ui-widget">
<h:panelGrid columns="2">
<h:panelGroup >
<h:panelGroup>
<ui:fragment rendered="#{not empty userView.user.id}">
<div id="webcamcontainer" style="display: none;">
<p:overlayPanel id="chartPanel" for="webcamButton" hideEffect="fade">
<p:photoCam widgetVar="pc" listener="#{userView.oncapture}" update="@all" />
<p:commandButton type="button" value="Capture" onclick="pc.capture()" />
</div>
</p:overlayPanel>
<h:outputText rendered="#{empty userView.user.currentImage}" value="#{i18n['user.noCurrentImage']}" />
<ui:fragment rendered="#{!empty userView.user.currentImage}">
<img style="width: 150px;" src="#{request.contextPath}/dydata/userimage/#{userView.user.currentImage.id}.img" alt="image" />
</ui:fragment>
<br />
<button onclick="$('#webcamcontainer').show();$(this).hide();return false;">#{i18n['userimage.webcam']}</button>
<p:commandButton id="webcamButton" value="#{i18n['userimage.webcam']}" type="button" />
<br />
<br />
<p:fileUpload id="uploadfile" required="TRUE" requiredMessage="Required!" invalidSizeMessage="#{i18n['user.imageTooBig']}" sizeLimit="1024" value="#{userView.image}" mode="simple" />
<h:message for="uploadfile" />
<h:commandButton styleClass="ui-button" action="#{userView.sendImage}" value="#{i18n['user.imagesubmit']}" />
<p:message for="uploadfile" />
<p:commandButton action="#{userView.sendImage}" value="#{i18n['user.imagesubmit']}" />
</ui:fragment>
<ui:fragment rendered="#{cc.attrs.creating}">
<h:outputLabel value="#{i18n['user.login']}:" for="login" />
<h:outputLabel value="#{i18n['user.login']}" for="login" />
<br />
<h:inputText styleClass="ui-input" size="25" id="login" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.login}" />
<h:message for="login" />
<p:inplace emptyLabel="#{i18n['user.insert']}">
<p:inputText size="25" id="login" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.login}" />
</p:inplace>
<p:message for="login" />
<br />
</ui:fragment>
<br />
<h:outputLabel value="#{i18n['user.email']}:" for="email" />
<br />
<h:inputText styleClass="ui-input" validator="#{userValidator.validateEmail}" size="45" id="email" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.email}" />
<h:message for="email" />
<br />
<h:outputLabel rendered="#{cc.attrs.creating}" value="#{i18n['user.password']}:" for="password" />
<h:outputLabel rendered="#{cc.attrs.creating}" value="#{i18n['user.password']}" for="password" />
<br />
<h:inputSecret styleClass="ui-input" validator="#{userValidator.password}" rendered="#{cc.attrs.creating}" id="password" value="#{userView.password}" />
<h:message rendered="#{cc.attrs.creating}" for="password" />
<p:inplace emptyLabel="#{i18n['user.insert']}">
<p:password validator="#{userValidator.password}" rendered="#{cc.attrs.creating}" id="password" value="#{userView.password}" />
</p:inplace>
<p:message rendered="#{cc.attrs.creating}" for="password" />
<br />
<h:outputLabel rendered="#{cc.attrs.creating}" value="#{i18n['user.passwordcheck']}:" for="passwordcheck" />
<p:outputLabel rendered="#{cc.attrs.creating}" value="#{i18n['user.passwordcheck']}" for="passwordcheck" />
<br />
<h:inputSecret styleClass="ui-input" validator="#{userValidator.password}" rendered="#{cc.attrs.creating}" id="passwordcheck" value="#{userView.passwordcheck}" />
<h:message rendered="#{cc.attrs.creating}" for="passwordcheck" />
<p:inplace emptyLabel="#{i18n['user.insert']}">
<p:password validator="#{userValidator.password}" rendered="#{cc.attrs.creating}" id="passwordcheck" value="#{userView.passwordcheck}" />
</p:inplace>
<p:message rendered="#{cc.attrs.creating}" for="passwordcheck" />
<br />
</h:panelGroup>
......@@ -79,52 +81,61 @@
<h:panelGroup>
<table>
<tr>
<td colspan="2"><h:outputLabel value="#{i18n['user.nick']}:" for="nick" /> <br /> <h:inputText size="45" id="nick" disabled="#{!cc.attrs.creating and !userView.canSave}"
value="#{userView.selectedUser.nick}" /><br /> <h:message for="nick" /></td>
<td colspan="2"><h:outputLabel value="#{i18n['user.nick']}" for="nick" /> <br />
<p:inplace emptyLabel="#{i18n['user.insert']}">
<p:inputText size="45" id="nick" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.nick}" />
</p:inplace></td>
</tr>
<tr>
<td><h:outputLabel value="#{i18n['user.firstNames']}:" for="firstnames" /></td>
<td><h:outputLabel value="#{i18n['user.lastName']}:" for="lastname" /></td>
<td><h:outputLabel value="#{i18n['user.firstNames']}" for="firstnames" /><br />
<p:inplace emptyLabel="#{i18n['user.insert']}">
<p:inputText size="22" id="firstnames" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.firstnames}" />
</p:inplace></td>
<td><h:outputLabel value="#{i18n['user.lastName']}" for="lastname" /><br />
<p:inplace emptyLabel="#{i18n['user.insert']}">
<p:inputText size="30" id="lastname" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.lastname}" />
</p:inplace></td>
</tr>
<tr>
<td><h:inputText styleClass="ui-input" size="22" id="firstnames" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.firstnames}" /></td>
<td><h:inputText styleClass="ui-input" size="30" id="lastname" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.lastname}" /></td>
</tr>
<tr>
<td><h:message for="firstnames" /></td>
<td><h:message for="lastname" /></td>
</tr>
<tr>
<td><h:outputLabel for="birthday" value="#{i18n['user.birthday']}:" /><br /> <p:calendar id="birthday" navigator="true" yearRange="c-80:c-0" locale="fi"
<td><h:outputLabel for="birthday" value="#{i18n['user.birthday']}" /><br /> <p:calendar id="birthday" navigator="true" yearRange="c-80:c-0" locale="fi"
value="#{userView.selectedUser.birthday}" pattern="#{sessionHandler.dateFormat}" timeZone="#{sessionHandler.timezone}" /> <h:message for="birthday" /></td>
<td><h:outputLabel value="#{i18n['user.sex']}:" for="sex" /> <br /> <h:selectOneMenu disabled="#{!cc.attrs.creating and !userView.canSave}" id="sex"
<td><h:outputLabel value="#{i18n['user.sex']}" for="sex" /> <br /> <p:selectOneMenu disabled="#{!cc.attrs.creating and !userView.canSave}" id="sex"
value="#{userView.selectedUser.gender}">
<f:selectItem id="undefined" itemLabel="#{i18n['user.sex.UNDEFINED']}" itemValue="UNDEFINED" />
<f:selectItem id="male" itemLabel="#{i18n['user.sex.MALE']}" itemValue="MALE" />
<f:selectItem id="female" itemLabel="#{i18n['user.sex.FEMALE']}" itemValue="FEMALE" />
</h:selectOneMenu> <h:message for="sex" /></td>
</p:selectOneMenu></td>
</tr>
</table>
<table>
<tr>
<td colspan="2"><h:outputLabel value="#{i18n['user.address']}:" for="address" /><br /> <h:inputText styleClass="ui-input" size="45" id="address" disabled="#{!cc.attrs.creating and !userView.canSave}"
value="#{userView.selectedUser.address}" /> <h:message for="address" /></td>
<td colspan="2"><p:outputLabel value="#{i18n['user.address']}" for="address" /><br />
<p:inplace emptyLabel="#{i18n['user.insert']}">
<p:inputText size="45" id="address" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.address}" />
</p:inplace></td>
</tr>
<tr>
<td><h:outputLabel value="#{i18n['user.zipCode']}:" for="zip" /><br /> <h:inputText styleClass="ui-input" size="7" id="zip" disabled="#{!cc.attrs.creating and !userView.canSave}"
value="#{userView.selectedUser.zip}" /> <h:message for="zip" /></td>
<td><h:outputLabel value="#{i18n['user.town']}:" for="town" /><br /> <h:inputText styleClass="ui-input" size="25" id="town" disabled="#{!cc.attrs.creating and !userView.canSave}"
value="#{userView.selectedUser.town}" /> <h:message for="town" /></td>
<td><p:outputLabel value="#{i18n['user.zipCode']}" for="zip" /><br />
<p:inplace emptyLabel="#{i18n['user.insert']}">
<p:inputText styleClass="ui-input" size="7" id="zip" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.zip}" />
</p:inplace> <p:message for="zip" /></td>
<td><p:outputLabel value="#{i18n['user.town']}" for="town" /><br />
<p:inplace emptyLabel="#{i18n['user.insert']}">
<p:inputText styleClass="ui-input" size="25" id="town" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.town}" />
</p:inplace> <p:message for="town" /></td>
</tr>
<tr>
<td colspan="2"><h:outputLabel value="#{i18n['user.email']}" for="email" /> <br />
<p:inplace emptyLabel="#{i18n['user.insert']}">
<p:inputText validator="#{userValidator.validateEmail}" size="45" id="email" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.email}" />
</p:inplace></td>
</tr>
</table>
<h:outputLabel rendered="#{sessionHandler.superadmin}" value="#{i18n['user.superadmin']}:" for="superadmin" />
<h:selectBooleanCheckbox disabled="#{!cc.attrs.creating and !userView.canSave}" rendered="#{sessionHandler.superadmin}" id="superadmin" value="#{userView.selectedUser.superadmin}" />
<br />
<br />
<h:commandButton styleClass="ui-button" rendered="#{cc.attrs.creating or userView.canSave}" id="commitbtn" action="#{cc.attrs.commitaction}" value="#{cc.attrs.commitvalue}" />
<p:commandButton rendered="#{cc.attrs.creating or userView.canSave}" id="commitbtn" action="#{cc.attrs.commitaction}" value="#{cc.attrs.commitvalue}" />
</h:panelGroup>
......
......@@ -35,11 +35,6 @@
</h:panelGroup>
<h:panelGroup>
<h:dataGrid >
</h:dataGrid>
<h:outputLabel value="#{i18n['shop.readBarcode']}" />
<h:inputText id="barcode" value="#{productShopView.barcode}" />
<h:commandButton action="#{productShopView.readBarcode}" onclick="blip(); return true;" value="#{i18n['productShopView.readBarcode']}">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!