Commit b136d3e6 by Petri Jarvisalo

added phone-fields to ui, was missing

1 parent 81fcfa2a
<?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:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:tools="http://java.sun.com/jsf/composite/tools" xmlns:p="http://primefaces.org/ui">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:composite="http://java.sun.com/jsf/composite" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:tools="http://java.sun.com/jsf/composite/tools" xmlns:p="http://primefaces.org/ui">
<composite:interface>
<composite:attribute name="creating" required="false" default="false" />
<composite:attribute name="admincreate" required="false" />
<composite:attribute name="commitvalue" required="true" />
<composite:attribute name="commitaction" required="true" method-signature="java.lang.String action()" />
......@@ -22,7 +21,7 @@
</h2>
-->
<h:form id="userform" enctype="#{cc.attrs.creating?'':'multipart/form-data'}" >
<h:form id="userform" enctype="#{cc.attrs.creating?'':'multipart/form-data'}">
<h:panelGrid columns="2">
<h:panelGroup>
......@@ -80,18 +79,14 @@
<h:panelGroup>
<table>
<tr>
<td colspan="2"><h:outputLabel value="#{i18n['user.nick']}" for="nick" /> <br /> <p:inputText size="45" id="nick" disabled="#{!cc.attrs.creating and !userView.canSave}"
value="#{userView.selectedUser.nick}" /></td>
<td colspan="2"><h:outputLabel value="#{i18n['user.nick']}" for="nick" /> <br /> <p:inputText size="45" id="nick" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.nick}" /></td>
</tr>
<tr>
<td><h:outputLabel value="#{i18n['user.firstNames']}" for="firstnames" /><br /> <p:inputText size="22" id="firstnames" disabled="#{!cc.attrs.creating and !userView.canSave}"
value="#{userView.selectedUser.firstnames}" /></td>
<td><h:outputLabel value="#{i18n['user.lastName']}" for="lastname" /><br /> <p:inputText size="30" id="lastname" disabled="#{!cc.attrs.creating and !userView.canSave}"
value="#{userView.selectedUser.lastname}" /></td>
<td><h:outputLabel value="#{i18n['user.firstNames']}" for="firstnames" /><br /> <p:inputText size="22" id="firstnames" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.firstnames}" /></td>
<td><h:outputLabel value="#{i18n['user.lastName']}" for="lastname" /><br /> <p:inputText size="30" id="lastname" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.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"
value="#{userView.selectedUser.birthday}" pattern="#{sessionHandler.dateFormat}" timeZone="#{sessionHandler.timezone}" /> <h:message for="birthday" /></td>
<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 /> <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" />
......@@ -102,21 +97,19 @@
<table>
<tr>
<td colspan="2"><p:outputLabel value="#{i18n['user.address']}" for="address" /><br /> <p:inputText size="45" id="address" disabled="#{!cc.attrs.creating and !userView.canSave}"
value="#{userView.selectedUser.address}" /></td>
<td colspan="2"><p:outputLabel value="#{i18n['user.address']}" for="address" /><br /> <p:inputText size="45" id="address" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.address}" /></td>
</tr>
<tr>
<td><p:outputLabel value="#{i18n['user.zipCode']}" for="zip" /><br /> <p:inputText styleClass="ui-input" size="7" id="zip" disabled="#{!cc.attrs.creating and !userView.canSave}"
value="#{userView.selectedUser.zip}" /> <p:message for="zip" /></td>
<td><p:outputLabel value="#{i18n['user.town']}" for="town" /><br /> <p:inputText styleClass="ui-input" size="25" id="town" disabled="#{!cc.attrs.creating and !userView.canSave}"
value="#{userView.selectedUser.town}" /> <p:message for="town" /></td>
<td><p:outputLabel value="#{i18n['user.zipCode']}" for="zip" /><br /> <p:inputText styleClass="ui-input" size="7" id="zip" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.zip}" /> <p:message for="zip" /></td>
<td><p:outputLabel value="#{i18n['user.town']}" for="town" /><br /> <p:inputText styleClass="ui-input" size="25" id="town" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.town}" /> <p:message for="town" /></td>
</tr>
<tr>
<td colspan="2"><h:outputLabel value="#{i18n['user.email']}" for="email" /> <br /> <p:inputText validator="#{userValidator.validateEmail}" size="45" id="email"
disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.email}" /></td>
<td colspan="2"><h:outputLabel value="#{i18n['user.email']}" for="email" /> <br /> <p:inputText validator="#{userValidator.validateEmail}" size="45" id="email" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.email}" /></td>
</tr>
<tr>
<td><p:outputLabel value="#{i18n['user.phone']}" for="phone" /><br /> <p:inputText size="9" id="phone" disabled="#{!cc.attrs.creating and !userView.canSave}" value="#{userView.selectedUser.phone}" /> <p:message for="phone" /></td>
</tr>
</table>
<p:commandButton ajax="false" rendered="#{cc.attrs.creating or userView.canSave}" id="commitbtn" action="#{cc.attrs.commitaction}" value="#{cc.attrs.commitvalue}" />
......
......@@ -140,14 +140,19 @@
</tr>
<tr>
<td><h:outputLabel for="birthday"
value="#{i18n['user.birthday']}" /><br /> <p:calendar
value="#{i18n['user.birthday']}" /><br />
<p:inplace emptyLabel="#{i18n['user.insert']}">
<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
timeZone="#{sessionHandler.timezone}" /></p:inplace> <h:message
for="birthday" /></td>
<td><h:outputLabel value="#{i18n['user.sex']}" for="sex" />
<br /> <p:selectOneMenu
<br />
<p:selectOneMenu
disabled="#{!cc.attrs.creating and !userView.canSave}" id="sex"
value="#{userView.selectedUser.gender}">
<f:selectItem id="undefined"
......@@ -194,7 +199,14 @@
value="#{userView.selectedUser.email}" />
</p:inplace></td>
</tr>
<tr>
<td><p:outputLabel value="#{i18n['user.phone']}" for="phone" /><br />
<p:inplace emptyLabel="#{i18n['user.insert']}">
<p:inputText styleClass="ui-input" size="7" id="phone"
disabled="#{!cc.attrs.creating and !userView.canSave}"
value="#{userView.selectedUser.phone}" />
</p:inplace> <p:message for="phone" /></td>
</tr>
</table>
......
......@@ -253,12 +253,37 @@ text-decoration: none;
.ui-menu, .ui-menu .ui-menu-child {
background: #03080C;
}
.ui-widget-content a {
.ui-menu a {
color: #eee !important;
}
.nameMenuItem
{
float: right;
}
\ No newline at end of file
}
table {
border: none;
border-spacing: 0;
width: 100%;
text-align: left;
margin-bottom: 1.5em;
}
table thead th {
border: none;
font-size: 120%;
}
table thead th {
border-bottom: 1px solid black;
padding: 5px;
padding-left: 1em;
}
table tbody td {
border: none;
padding: 5px;
padding-left: 1em;
vertical-align: top;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!