1 | <head> |
---|
2 | <meta name="layout" content="main" /> |
---|
3 | <title>Edit Person</title> |
---|
4 | <nav:resources override="true"/> |
---|
5 | </head> |
---|
6 | |
---|
7 | <body> |
---|
8 | |
---|
9 | <div class="nav"> |
---|
10 | <nav:renderSubItems group="navAlt"/> |
---|
11 | </div> |
---|
12 | |
---|
13 | <div class="body"> |
---|
14 | <g:if test="${flash.message}"> |
---|
15 | <div class="message">${flash.message}</div> |
---|
16 | </g:if> |
---|
17 | <g:if test="${params.message}"> |
---|
18 | <div class="message">${params.message}</div> |
---|
19 | </g:if> |
---|
20 | <g:hasErrors bean="${person}"> |
---|
21 | <div class="errors"> |
---|
22 | <g:renderErrors bean="${person}" as="list" /> |
---|
23 | </div> |
---|
24 | </g:hasErrors> |
---|
25 | |
---|
26 | <!--<div class="prop"> |
---|
27 | <span class="name">ID: ${person.id}</span> |
---|
28 | </div>--> |
---|
29 | |
---|
30 | <g:form> |
---|
31 | <input type="hidden" name="id" value="${person.id}" /> |
---|
32 | <input type="hidden" name="version" value="${person.version}" /> |
---|
33 | <input type="hidden" name="password" value="${person.password}" /> |
---|
34 | <div class="dialog"> |
---|
35 | <table> |
---|
36 | <tbody> |
---|
37 | |
---|
38 | <tr class="prop"> |
---|
39 | <td valign="top" class="name"><label for="loginName">Login Name:</label></td> |
---|
40 | <td valign="top" class="value ${hasErrors(bean:person,field:'loginName','errors')}"> |
---|
41 | <input type="text" id="loginName" name="loginName" value="${person.loginName?.encodeAsHTML()}"/> |
---|
42 | <g:helpBalloon class="helpballoon" code="person.loginName" /> |
---|
43 | </td> |
---|
44 | </tr> |
---|
45 | |
---|
46 | <tr class="prop"> |
---|
47 | <td valign="top" class="name"><label for="firstName">First Name:</label></td> |
---|
48 | <td valign="top" class="value ${hasErrors(bean:person,field:'firstName','errors')}"> |
---|
49 | <input type="text" id="firstName" name="firstName" value="${person.firstName?.encodeAsHTML()}"/> |
---|
50 | <g:helpBalloon class="helpballoon" code="person.firstName" /> |
---|
51 | </td> |
---|
52 | </tr> |
---|
53 | |
---|
54 | <tr class="prop"> |
---|
55 | <td valign="top" class="name"><label for="lastName">Last Name:</label></td> |
---|
56 | <td valign="top" class="value ${hasErrors(bean:person,field:'lastName','errors')}"> |
---|
57 | <input type="text" id="lastName" name="lastName" value="${person.lastName?.encodeAsHTML()}"/> |
---|
58 | <g:helpBalloon class="helpballoon" code="person.lastName" /> |
---|
59 | </td> |
---|
60 | </tr> |
---|
61 | |
---|
62 | <tr class="prop"> |
---|
63 | <td valign="top" class="name"><label for="pass">Password:</label></td> |
---|
64 | <td valign="top" class="value ${hasErrors(bean:person,field:'pass','errors')}"> |
---|
65 | <input type="password" id="pass" name="pass" value="${person.pass?.encodeAsHTML()}"/> |
---|
66 | <g:helpBalloon class="helpballoon" code="person.password" /> |
---|
67 | </td> |
---|
68 | </tr> |
---|
69 | |
---|
70 | <tr class="prop"> |
---|
71 | <td valign="top" class="name"><label for="isActive">Active:</label></td> |
---|
72 | <td valign="top" class="value ${hasErrors(bean:person,field:'isActive','errors')}"> |
---|
73 | <g:checkBox name="isActive" value="${person.isActive}"/> |
---|
74 | <g:helpBalloon class="helpballoon" code="person.isActive" /> |
---|
75 | </td> |
---|
76 | </tr> |
---|
77 | |
---|
78 | <tr class="prop"> |
---|
79 | <td valign="top" class="name"><label for="description">Description:</label></td> |
---|
80 | <td valign="top" class="value ${hasErrors(bean:person,field:'description','errors')}"> |
---|
81 | <input type="text" id="description" name="description" value="${person.description?.encodeAsHTML()}"/> |
---|
82 | </td> |
---|
83 | </tr> |
---|
84 | |
---|
85 | <tr class="prop"> |
---|
86 | <td valign="top" class="name"><label for="email">Email:</label></td> |
---|
87 | <td valign="top" class="value ${hasErrors(bean:person,field:'email','errors')}"> |
---|
88 | <input type="text" id="email" name="email" value="${person?.email?.encodeAsHTML()}"/> |
---|
89 | </td> |
---|
90 | </tr> |
---|
91 | |
---|
92 | <tr class="prop"> |
---|
93 | <td valign="top" class="name"><label for="emailShow">Show Email:</label></td> |
---|
94 | <td valign="top" class="value ${hasErrors(bean:person,field:'emailShow','errors')}"> |
---|
95 | <g:checkBox name="emailShow" value="${person.emailShow}"/> |
---|
96 | </td> |
---|
97 | </tr> |
---|
98 | |
---|
99 | <tr class="prop"> |
---|
100 | <td valign="top" class="name"><label for="employeeID">employee ID:</label></td> |
---|
101 | <td valign="top" class="value ${hasErrors(bean:person,field:'employeeID','errors')}"> |
---|
102 | <input type="text" id="employeeID" name="employeeID" value="${person.employeeID?.encodeAsHTML()}"/> |
---|
103 | </td> |
---|
104 | </tr> |
---|
105 | |
---|
106 | <tr class="prop"> |
---|
107 | <td valign="top" class="name"> |
---|
108 | <label for="department">Department:</label> |
---|
109 | </td> |
---|
110 | <td valign="top" class="value ${hasErrors(bean:person,field:'department','errors')}"> |
---|
111 | <g:select optionKey="id" from="${Department.list()}" name="department.id" value="${person?.department?.id}" noSelection="['null':'--None--']"></g:select> |
---|
112 | </td> |
---|
113 | </tr> |
---|
114 | |
---|
115 | <tr class="prop"> |
---|
116 | <td valign="top" class="name"> |
---|
117 | <label for="personGroups">Groups:</label> |
---|
118 | </td> |
---|
119 | <td valign="top" class="value ${hasErrors(bean:person,field:'personGroups','errors')}"> |
---|
120 | <g:select id="personGroups" name="personGroups" |
---|
121 | from="${PersonGroup.list()}" |
---|
122 | optionKey="id" size="10" multiple="yes" |
---|
123 | value="${person?.personGroups.id}" noSelection="['':'--None--']"/> |
---|
124 | <g:helpBalloon class="helpballoon" code="person.personGroups" /> |
---|
125 | </td> |
---|
126 | </tr> |
---|
127 | |
---|
128 | <tr class="prop"> |
---|
129 | <td valign="top" class="name" align="left"> |
---|
130 | Authorities: |
---|
131 | </td> |
---|
132 | <td valign="top" class="name" align="left"> |
---|
133 | <g:helpBalloon class="helpballoon" code="person.authorities" /> |
---|
134 | </td> |
---|
135 | </tr> |
---|
136 | |
---|
137 | <g:each var="entry" in="${roleMap}"> |
---|
138 | <tr> |
---|
139 | <td valign="top" class="name" align="left">${entry.key.authority.encodeAsHTML()}</td> |
---|
140 | <td align="left"><g:checkBox name="${entry.key.authority}" value="${entry.value}"/></td> |
---|
141 | </tr> |
---|
142 | </g:each> |
---|
143 | |
---|
144 | </tbody> |
---|
145 | </table> |
---|
146 | </div> |
---|
147 | |
---|
148 | <div class="buttons"> |
---|
149 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
150 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
151 | </div> |
---|
152 | |
---|
153 | </g:form> |
---|
154 | |
---|
155 | </div> |
---|
156 | </body> |
---|