-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathadmin crud.xhtml
More file actions
61 lines (60 loc) · 3.19 KB
/
admin crud.xhtml
File metadata and controls
61 lines (60 loc) · 3.19 KB
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
<?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://xmlns.jcp.org/jsf/html"
xmlns:a="http://xmlns.jcp.org/jsf/passthrough"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
<h:head>
<title>Edit User</title>
<h:outputStylesheet library="css" name="assets/css/bootstrap.css"/>
<h:outputScript library="js" name="validator.js"/>
</h:head>
<h:body>
#{addUser.autoFill}
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<a class="navbar-brand" href="index.xhtml">Holy Grail</a>
</div>
</nav>
<h:form class="login container-fluid" id="form-register">
<div class="row first-row">
<div class="col-md-3"/>
<div class="col-md-3"><label for="username">username</label></div>
<div class="col-md-3"><h:inputText a:placeholder="username" requiredMessage="username is empty" required="true" id="register_username" value="#{addUser.username}"/></div>
</div>
<div class="row">
<div class="col-md-3"/>
<div class="col-md-3"><label for="password">password</label></div>
<div class="col-md-3"><h:inputSecret a:placeholder="password" requiredMessage="password is empty" required="true" id="register_password" value="#{addUser.password}"/></div>
</div>
<div class="row">
<div class="col-md-3"/>
<div class="col-md-3"><label for="email">email</label></div>
<div class="col-md-3"><h:inputText a:placeholder="email" requiredMessage="email is empty" required="true" id="register_email" value="#{addUser.email}"/></div>
</div>
<div class="row">
<div class="col-md-3"/>
<div class="col-md-3"><label for="role">role</label></div>
<div class="col-md-3">
<h:selectOneMenu value="#{addUser.role}">
<f:selectItem itemValue="admin" itemLabel="admin"/>
<f:selectItem itemValue="owner" itemLabel="owner"/>
<f:selectItem itemValue="editor" itemLabel="editor"/>
</h:selectOneMenu>
</div>
</div>
<div class="row">
<div class="col-md-3"/>
<div class="col-md-3">
<h:commandButton onclick="return emailValidator()" type="submit" class="login-button btn-success" id="adduser" value="Update User"/>
</div>
</div>
</h:form>
<c:if test="#{addUser.username.length() != 0 and addUser.password.length() != 0 and addUser.role.length() != 0 and addUser.email.length() != 0}">
<h:outputText escape="false" value="#{addUser.checkAvail}"/>
</c:if>
<div id="ganti-error-message" class="error-message">
</div>
</h:body>
</html>