1 | <head> |
---|
2 | <meta name="layout" content="main" /> |
---|
3 | <title>Edit Person</title> |
---|
4 | </head> |
---|
5 | |
---|
6 | <body> |
---|
7 | |
---|
8 | <div class="nav"> |
---|
9 | <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span> |
---|
10 | <span class="menuButton"><g:link class="list" action="list">Person List</g:link></span> |
---|
11 | <span class="menuButton"><g:link class="create" action="create">New Person</g:link></span> |
---|
12 | </div> |
---|
13 | |
---|
14 | <div class="body"> |
---|
15 | <h1>Edit Person</h1> |
---|
16 | <g:if test="${flash.message}"> |
---|
17 | <div class="message">${flash.message}</div> |
---|
18 | </g:if> |
---|
19 | <g:hasErrors bean="${person}"> |
---|
20 | <div class="errors"> |
---|
21 | <g:renderErrors bean="${person}" as="list" /> |
---|
22 | </div> |
---|
23 | </g:hasErrors> |
---|
24 | |
---|
25 | <div class="prop"> |
---|
26 | <span class="name">ID: ${person.id}</span> |
---|
27 | </div> |
---|
28 | |
---|
29 | <g:form> |
---|
30 | <input type="hidden" name="id" value="${person.id}" /> |
---|
31 | <input type="hidden" name="version" value="${person.version}" /> |
---|
32 | <input type="hidden" name="password" value="${person.password}" /> |
---|
33 | <div class="dialog"> |
---|
34 | <table> |
---|
35 | <tbody> |
---|
36 | |
---|
37 | <tr class="prop"> |
---|
38 | <td valign="top" class="name"><label for="loginName">Login Name:</label></td> |
---|
39 | <td valign="top" class="value ${hasErrors(bean:person,field:'loginName','errors')}"> |
---|
40 | <input type="text" id="loginName" name="loginName" value="${person.loginName?.encodeAsHTML()}"/> |
---|
41 | </td> |
---|
42 | </tr> |
---|
43 | |
---|
44 | <tr class="prop"> |
---|
45 | <td valign="top" class="name"><label for="firstName">First Name:</label></td> |
---|
46 | <td valign="top" class="value ${hasErrors(bean:person,field:'firstName','errors')}"> |
---|
47 | <input type="text" id="firstName" name="firstName" value="${person.firstName?.encodeAsHTML()}"/> |
---|
48 | </td> |
---|
49 | </tr> |
---|
50 | |
---|
51 | <tr class="prop"> |
---|
52 | <td valign="top" class="name"><label for="lastName">Last Name:</label></td> |
---|
53 | <td valign="top" class="value ${hasErrors(bean:person,field:'lastName','errors')}"> |
---|
54 | <input type="text" id="lastName" name="lastName" value="${person.lastName?.encodeAsHTML()}"/> |
---|
55 | </td> |
---|
56 | </tr> |
---|
57 | |
---|
58 | <tr class="prop"> |
---|
59 | <td valign="top" class="name"><label for="pass">Password:</label></td> |
---|
60 | <td valign="top" class="value ${hasErrors(bean:person,field:'pass','errors')}"> |
---|
61 | <input type="password" id="pass" name="pass" value="${person.pass?.encodeAsHTML()}"/> |
---|
62 | </td> |
---|
63 | </tr> |
---|
64 | |
---|
65 | <tr class="prop"> |
---|
66 | <td valign="top" class="name"><label for="isActive">isActive:</label></td> |
---|
67 | <td valign="top" class="value ${hasErrors(bean:person,field:'isActive','errors')}"> |
---|
68 | <g:checkBox name="isActive" value="${person.isActive}"/> |
---|
69 | </td> |
---|
70 | </tr> |
---|
71 | |
---|
72 | <tr class="prop"> |
---|
73 | <td valign="top" class="name"><label for="description">Description:</label></td> |
---|
74 | <td valign="top" class="value ${hasErrors(bean:person,field:'description','errors')}"> |
---|
75 | <input type="text" id="description" name="description" value="${person.description?.encodeAsHTML()}"/> |
---|
76 | </td> |
---|
77 | </tr> |
---|
78 | |
---|
79 | <tr class="prop"> |
---|
80 | <td valign="top" class="name"><label for="email">Email:</label></td> |
---|
81 | <td valign="top" class="value ${hasErrors(bean:person,field:'email','errors')}"> |
---|
82 | <input type="text" id="email" name="email" value="${person?.email?.encodeAsHTML()}"/> |
---|
83 | </td> |
---|
84 | </tr> |
---|
85 | |
---|
86 | <tr class="prop"> |
---|
87 | <td valign="top" class="name"><label for="emailShow">Show Email:</label></td> |
---|
88 | <td valign="top" class="value ${hasErrors(bean:person,field:'emailShow','errors')}"> |
---|
89 | <g:checkBox name="emailShow" value="${person.emailShow}"/> |
---|
90 | </td> |
---|
91 | </tr> |
---|
92 | |
---|
93 | <tr class="prop"> |
---|
94 | <td valign="top" class="name"><label for="employeeID">employee ID:</label></td> |
---|
95 | <td valign="top" class="value ${hasErrors(bean:person,field:'employeeID','errors')}"> |
---|
96 | <input type="text" id="employeeID" name="employeeID" value="${person.employeeID?.encodeAsHTML()}"/> |
---|
97 | </td> |
---|
98 | </tr> |
---|
99 | |
---|
100 | <tr class="prop"> |
---|
101 | <td valign="top" class="name" align="left">Authorities:</td> |
---|
102 | </tr> |
---|
103 | |
---|
104 | <g:each var="entry" in="${roleMap}"> |
---|
105 | <tr> |
---|
106 | <td valign="top" class="name" align="left">${entry.key.authority.encodeAsHTML()}</td> |
---|
107 | <td align="left"><g:checkBox name="${entry.key.authority}" value="${entry.value}"/></td> |
---|
108 | </tr> |
---|
109 | </g:each> |
---|
110 | |
---|
111 | </tbody> |
---|
112 | </table> |
---|
113 | </div> |
---|
114 | |
---|
115 | <div class="buttons"> |
---|
116 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
117 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
118 | </div> |
---|
119 | |
---|
120 | </g:form> |
---|
121 | |
---|
122 | </div> |
---|
123 | </body> |
---|