This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: split up create and edit profile page from registration workflow…
… and profile edit workflow
- Loading branch information
Alex Eng
committed
Nov 27, 2013
1 parent
1eda383
commit 259b175
Showing
5 changed files
with
140 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
zanata-war/src/main/webapp/WEB-INF/layout/profile/edit_form.xhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<s:fragment | ||
xmlns="http://www.w3.org/1999/xhtml" | ||
xmlns:s="http://jboss.org/schema/seam/taglib" | ||
xmlns:f="http://java.sun.com/jsf/core" | ||
xmlns:h="http://java.sun.com/jsf/html" | ||
xmlns:a4j="http://richfaces.org/a4j" | ||
xmlns:rich="http://richfaces.org/rich"> | ||
|
||
<div class="l--push-top-half form__item"> | ||
<h:outputLabel for="name">#{messages['jsf.Name']} | ||
<s:span styleClass="txt--required">*</s:span> | ||
<s:span styleClass="icon-info-circle-2 input_help" id="nameHelp"> | ||
<rich:tooltip> | ||
#{messages['jsf.NameToolTip']} | ||
</rich:tooltip> | ||
</s:span> | ||
</h:outputLabel> | ||
<s:decorate id="nameField" template="../field.xhtml" enclose="true"> | ||
<h:inputText id="name" value="#{profileAction.name}" required="true" | ||
maxlength="80"> | ||
<a4j:ajax event="blur" render="nameField" execute="@this"/> | ||
</h:inputText> | ||
</s:decorate> | ||
</div> | ||
|
||
<div class="l--push-top-half form__item"> | ||
<h:outputLabel for="username">#{messages['jsf.Username']} | ||
<s:span styleClass="txt--required">*</s:span> | ||
<s:span styleClass="icon-info-circle-2 input_help" id="usernameHelp"> | ||
<rich:tooltip> | ||
#{messages['jsf.UsernameToolTip']} | ||
</rich:tooltip> | ||
</s:span> | ||
</h:outputLabel> | ||
<s:decorate id="usernameField" template="../field.xhtml" enclose="true"> | ||
<h:inputText id="username" required="true" maxlength="80" | ||
rendered="#{profileAction.newUser}" | ||
value="#{profileAction.username}"> | ||
<a4j:ajax event="blur" render="usernameField" execute="@this"/> | ||
</h:inputText> | ||
|
||
<h:inputText required="true" maxlength="80" | ||
rendered="#{not profileAction.newUser}" | ||
value="#{profileAction.username}" disabled="true"> | ||
<a4j:ajax event="blur" render="usernameField" execute="@this"/> | ||
</h:inputText> | ||
|
||
</s:decorate> | ||
</div> | ||
|
||
<div class="l--push-top-half form__item"> | ||
<h:outputLabel for="email"> | ||
#{messages['jsf.Email']} | ||
<s:span styleClass="icon-info-circle-2 input_help" id="emailHelp"> | ||
<rich:tooltip> | ||
#{messages['jsf.EmailToolTip']} | ||
</rich:tooltip> | ||
</s:span> | ||
</h:outputLabel> | ||
<s:decorate id="emailField" template="../field.xhtml"> | ||
<h:inputText id="email" required="false" | ||
value="#{profileAction.email}"> | ||
<a4j:ajax event="blur" render="emailField" execute="@this"/> | ||
</h:inputText> | ||
</s:decorate> | ||
</div> | ||
</s:fragment> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<ui:composition xmlns="http://www.w3.org/1999/xhtml" | ||
xmlns:ui="http://java.sun.com/jsf/facelets" | ||
xmlns:h="http://java.sun.com/jsf/html" | ||
xmlns:s="http://jboss.org/schema/seam/taglib" | ||
template="../WEB-INF/template/template.xhtml"> | ||
|
||
<ui:define | ||
name="page_title">#{messages['jsf.Profile']}:#{messages['jsf.NewUser.Label']}</ui:define> | ||
|
||
<ui:define name="center_content"> | ||
<div class="g--centered"> | ||
<div class="g__item w--1-2-m w--3-8-l w--1-3 l--push-bottom-1"> | ||
|
||
<s:link view="/account/register.xhtml" | ||
propagation="none" | ||
rendered="#{applicationConfiguration.internalAuth}"> | ||
<p class="txt--meta l--push-all-0">#{messages['jsf.Signup']}</p> | ||
</s:link> | ||
|
||
<s:fragment | ||
rendered="#{not applicationConfiguration.internalAuth and not empty applicationConfiguration.registerPath}"> | ||
<a href="#{applicationConfiguration.registerPath}"> | ||
<p class="txt--meta l--push-all-0">#{messages['jsf.Signup']}</p> | ||
</a> | ||
</s:fragment> | ||
|
||
<h1 class="l--push-all-0">#{messages['jsf.NewUser.Label']}</h1> | ||
<h:form id="profile-form"> | ||
<ui:include src="../WEB-INF/layout/profile/edit_form.xhtml"/> | ||
|
||
<div class="l--push-top-1"> | ||
<h:commandButton id="user-create-new" | ||
value="#{messages['jsf.NewUser.Create']}" | ||
action="#{profileAction.createUser}" | ||
styleClass="l--push-right-half button--primary"/> | ||
<s:button id="user-create-cancel" styleClass="button button-link" | ||
value="#{messages['jsf.Cancel']}" | ||
action="#{profileAction.cancel}"/> | ||
</div> | ||
|
||
|
||
</h:form> | ||
</div> | ||
</div> | ||
</ui:define> | ||
|
||
|
||
</ui:composition> |