This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
/
userdetail.xhtml
115 lines (97 loc) · 4.54 KB
/
userdetail.xhtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!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:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jsf/core"
xmlns:s="http://jboss.org/schema/seam/taglib">
<ui:composition template="../WEB-INF/template/template.xhtml">
<ui:define name="head">
<style type="text/css">
.checkbox label {
padding: 0 0.40625em;
}
</style>
</ui:define>
<ui:define
name="page_title">#{userAction.username} - #{msgs['jsf.AccountDetails']}</ui:define>
<ui:define name="center_content">
<div class="g--centered">
<div class="g__item w--3-4-m w--5-8-l w--1-3 l--push-bottom-1">
<p class="txt--meta l--push-all-0">
<h:link outcome="/admin/home.xhtml">
#{msgs['jsf.Administration']}
</h:link>
<i class="i i--arrow-right"></i>
<h:link outcome="/admin/usermanager.xhtml">
#{msgs['jsf.ManageUsers']}
</h:link>
</p>
<h1 class="l--push-all-0">#{msgs['jsf.AccountDetails']}</h1>
<h:form id="userdetailForm"
rendered="#{identityManager.userExists(userAction.username)}">
<s:token allowMultiplePosts="true"/>
<div class="form__item l--push-top-1">
<h:outputLabel for="username">#{msgs['jsf.Username']}</h:outputLabel>
<input id="username" type="text" disabled="disabled"
value="#{userAction.username}"/>
</div>
<div class="form__item l--push-top-1">
<h:outputLabel for="email">#{msgs['jsf.Email']}</h:outputLabel>
<input id="email" type="text" disabled="disabled"
value="#{userAction.getEmail(userAction.username)}"/>
</div>
<s:div styleClass="form__item l--push-top-1"
rendered="#{applicationConfiguration.internalAuth}">
<h:outputLabel for="password">#{msgs['jsf.password.change']}</h:outputLabel>
<s:decorate id="passwordField"
template="../WEB-INF/layout/field.xhtml" enclose="true">
<div class="form__password js-form-password-parent">
<h:inputSecret id="password"
styleClass="js-form-password-input form__input"
value="#{userAction.password}">
</h:inputSecret>
<a href="#" class="form__toggle js-form-password-toggle">Show</a>
</div>
</s:decorate>
</s:div>
<s:div styleClass="form__item l--push-top-1"
rendered="#{applicationConfiguration.internalAuth}">
<h:outputLabel for="confirm">#{msgs['jsf.ConfirmPassword']}</h:outputLabel>
<s:decorate id="passwordConfirmField"
template="../WEB-INF/layout/field.xhtml" enclose="true">
<div class="form__password js-form-password-parent">
<h:inputSecret id="confirm"
styleClass="js-form-password-input form__input"
value="#{userAction.confirm}">
</h:inputSecret>
<a href="#" class="form__toggle js-form-password-toggle">Show</a>
</div>
</s:decorate>
</s:div>
<div class="form__item l--push-top-1">
<h:outputLabel>#{msgs['jsf.MemberOf']}</h:outputLabel>
<s:decorate id="rolesField" template="../WEB-INF/layout/field.xhtml" enclose="true">
<h:selectManyCheckbox id="roles" value="#{userAction.roles}"
layout="pageDirection" styleClass="checkbox">
<c:selectItems value="#{identityManager.listGrantableRoles()}" var="role"
itemLabel="#{role}"/>
</h:selectManyCheckbox>
</s:decorate>
</div>
<div class="form__item l--push-top-1 checkbox">
<h:outputLabel for="enabled">#{msgs['jsf.AccountEnabled']}</h:outputLabel>
<h:selectBooleanCheckbox id="enabled" value="#{userAction.enabled}"/>
</div>
<h:commandButton id="userdetailSave" value="#{msgs['jsf.Save']}"
action="#{userAction.save}" styleClass="button--primary"/>
<!-- TODO pahuang is conversation scope automatically ended -->
<h:button id="userdetailCancel" outcome="/admin/usermanager.xhtml"
value="#{msgs['jsf.Cancel']}"
styleClass="button button--link l--push-left-half"/>
</h:form>
</div>
</div>
</ui:define>
</ui:composition>
</html>