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:render template="/shared/messages" /> |
---|
15 | <g:hasErrors bean="${person}"> |
---|
16 | <div class="errors"> |
---|
17 | <g:renderErrors bean="${person}" as="list" /> |
---|
18 | </div> |
---|
19 | </g:hasErrors> |
---|
20 | |
---|
21 | <!--<div class="prop"> |
---|
22 | <span class="name">ID: ${person.id}</span> |
---|
23 | </div>--> |
---|
24 | |
---|
25 | <g:form> |
---|
26 | <input type="hidden" name="id" value="${person.id}" /> |
---|
27 | <input type="hidden" name="version" value="${person.version}" /> |
---|
28 | <input type="hidden" name="password" value="${person.password}" /> |
---|
29 | <div class="dialog"> |
---|
30 | <table> |
---|
31 | <tbody> |
---|
32 | |
---|
33 | <tr class="prop"> |
---|
34 | <td valign="top" class="name"><label for="loginName">Login Name:</label></td> |
---|
35 | <td valign="top" class="value ${hasErrors(bean:person,field:'loginName','errors')}"> |
---|
36 | <input type="text" id="loginName" name="loginName" value="${person.loginName?.encodeAsHTML()}"/> |
---|
37 | <g:helpBalloon class="helpballoon" code="person.loginName" /> |
---|
38 | </td> |
---|
39 | </tr> |
---|
40 | |
---|
41 | <tr class="prop"> |
---|
42 | <td valign="top" class="name"><label for="firstName">First Name:</label></td> |
---|
43 | <td valign="top" class="value ${hasErrors(bean:person,field:'firstName','errors')}"> |
---|
44 | <input type="text" id="firstName" name="firstName" value="${person.firstName?.encodeAsHTML()}"/> |
---|
45 | <g:helpBalloon class="helpballoon" code="person.firstName" /> |
---|
46 | </td> |
---|
47 | </tr> |
---|
48 | |
---|
49 | <tr class="prop"> |
---|
50 | <td valign="top" class="name"><label for="lastName">Last Name:</label></td> |
---|
51 | <td valign="top" class="value ${hasErrors(bean:person,field:'lastName','errors')}"> |
---|
52 | <input type="text" id="lastName" name="lastName" value="${person.lastName?.encodeAsHTML()}"/> |
---|
53 | <g:helpBalloon class="helpballoon" code="person.lastName" /> |
---|
54 | </td> |
---|
55 | </tr> |
---|
56 | |
---|
57 | <tr class="prop"> |
---|
58 | <td valign="top" class="name"><label for="pass">Password:</label></td> |
---|
59 | <td valign="top" class="value ${hasErrors(bean:person,field:'pass','errors')}"> |
---|
60 | <input type="password" id="pass" name="pass" value="${person.pass?.encodeAsHTML()}"/> |
---|
61 | <g:helpBalloon class="helpballoon" code="person.password" /> |
---|
62 | </td> |
---|
63 | </tr> |
---|
64 | |
---|
65 | <tr class="prop"> |
---|
66 | <td valign="top" class="name"><label for="isActive">Active:</label></td> |
---|
67 | <td valign="top" class="value ${hasErrors(bean:person,field:'isActive','errors')}"> |
---|
68 | <g:checkBox name="isActive" value="${person.isActive}"/> |
---|
69 | <g:helpBalloon class="helpballoon" code="person.isActive" /> |
---|
70 | </td> |
---|
71 | </tr> |
---|
72 | |
---|
73 | <tr class="prop"> |
---|
74 | <td valign="top" class="name"><label for="description">Description:</label></td> |
---|
75 | <td valign="top" class="value ${hasErrors(bean:person,field:'description','errors')}"> |
---|
76 | <input type="text" id="description" name="description" value="${person.description?.encodeAsHTML()}"/> |
---|
77 | </td> |
---|
78 | </tr> |
---|
79 | |
---|
80 | <tr class="prop"> |
---|
81 | <td valign="top" class="name"> |
---|
82 | <label for="addresses">Contact:</label> |
---|
83 | </td> |
---|
84 | <td valign="top" class="value"> |
---|
85 | <ul> |
---|
86 | <g:each var="i" in="${person?.contacts}"> |
---|
87 | <li><g:link controller="contactDetailed" action="show" id="${i.id}"> |
---|
88 | ${i?.encodeAsHTML()} |
---|
89 | </g:link></li> |
---|
90 | </g:each> |
---|
91 | </ul> |
---|
92 | <g:link controller="contactDetailed" params="['person.id':person?.id]" action="create">+Add Contact</g:link> |
---|
93 | </td> |
---|
94 | </tr> |
---|
95 | |
---|
96 | <tr class="prop"> |
---|
97 | <td valign="top" class="name"> |
---|
98 | <label for="addresses">Addresses:</label> |
---|
99 | </td> |
---|
100 | <td valign="top" class="value"> |
---|
101 | <ul> |
---|
102 | <g:each var="i" in="${person?.addresses}"> |
---|
103 | <li><g:link controller="addressDetailed" action="show" id="${i.id}"> |
---|
104 | ${i?.encodeAsHTML()} |
---|
105 | </g:link></li> |
---|
106 | </g:each> |
---|
107 | </ul> |
---|
108 | <g:link controller="addressDetailed" params="['person.id':person?.id]" action="create">+Add Address</g:link> |
---|
109 | </td> |
---|
110 | </tr> |
---|
111 | |
---|
112 | <tr class="prop"> |
---|
113 | <td valign="top" class="name"><label for="employeeID">employee ID:</label></td> |
---|
114 | <td valign="top" class="value ${hasErrors(bean:person,field:'employeeID','errors')}"> |
---|
115 | <input type="text" id="employeeID" name="employeeID" value="${person.employeeID?.encodeAsHTML()}"/> |
---|
116 | </td> |
---|
117 | </tr> |
---|
118 | |
---|
119 | <tr class="prop"> |
---|
120 | <td valign="top" class="name"> |
---|
121 | <label for="department">Department:</label> |
---|
122 | </td> |
---|
123 | <td valign="top" class="value ${hasErrors(bean:person,field:'department','errors')}"> |
---|
124 | <g:select optionKey="id" from="${Department.list()}" name="department.id" value="${person?.department?.id}" noSelection="['null':'--None--']"></g:select> |
---|
125 | </td> |
---|
126 | </tr> |
---|
127 | |
---|
128 | <tr class="prop"> |
---|
129 | <td valign="top" class="name"> |
---|
130 | <label for="personGroups">Groups:</label> |
---|
131 | </td> |
---|
132 | <td valign="top" class="value ${hasErrors(bean:person,field:'personGroups','errors')}"> |
---|
133 | <g:helpBalloon class="helpballoon" code="person.personGroups" /> |
---|
134 | <custom:checkBoxList name="personGroups" |
---|
135 | from="${PersonGroup.findAllByIsActive(true)}" |
---|
136 | value="${person?.personGroups?.collect{it.id}}" |
---|
137 | optionKey="id" |
---|
138 | sortBy="name" |
---|
139 | linkController="personGroupDetailed" |
---|
140 | linkAction="show"/> |
---|
141 | <g:link controller="personGroupDetailed" action="create">+Add Group</g:link> |
---|
142 | </td> |
---|
143 | </tr> |
---|
144 | |
---|
145 | <tr class="prop"> |
---|
146 | <td valign="top" class="name" align="left"> |
---|
147 | Authorities: |
---|
148 | </td> |
---|
149 | <td valign="top" class="name" align="left"> |
---|
150 | <g:helpBalloon class="helpballoon" code="person.authorities" /> |
---|
151 | </td> |
---|
152 | </tr> |
---|
153 | |
---|
154 | <g:each var="entry" in="${roleMap}"> |
---|
155 | <tr> |
---|
156 | <td valign="top" class="name" align="left">${entry.key.description.encodeAsHTML()}</td> |
---|
157 | <td align="left"><g:checkBox name="${entry.key.authority}" value="${entry.value}"/></td> |
---|
158 | </tr> |
---|
159 | </g:each> |
---|
160 | |
---|
161 | </tbody> |
---|
162 | </table> |
---|
163 | </div> |
---|
164 | |
---|
165 | <div class="buttons"> |
---|
166 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
167 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
168 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
169 | </div> |
---|
170 | |
---|
171 | </g:form> |
---|
172 | |
---|
173 | </div> |
---|
174 | </body> |
---|