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:</span> |
---|
27 | <span class="value">${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 | <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">Full 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">Full 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="password">Password:</label></td> |
---|
60 | <td valign="top" class="value ${hasErrors(bean:person,field:'password','errors')}"> |
---|
61 | <input type="password" id="password" name="password" value="${person.password?.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"><label for="authorities">Authorities:</label></td> |
---|
102 | <td valign="top" class="value ${hasErrors(bean:person,field:'authorities','errors')}"> |
---|
103 | <ul> |
---|
104 | <g:each var="entry" in="${roleMap}"> |
---|
105 | <li>${entry.key.authority.encodeAsHTML()} |
---|
106 | <g:checkBox name="${entry.key.authority}" value="${entry.value}"/> |
---|
107 | </li> |
---|
108 | </g:each> |
---|
109 | </ul> |
---|
110 | </td> |
---|
111 | </tr> |
---|
112 | |
---|
113 | </tbody> |
---|
114 | </table> |
---|
115 | </div> |
---|
116 | |
---|
117 | <div class="buttons"> |
---|
118 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
119 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
120 | </div> |
---|
121 | |
---|
122 | </g:form> |
---|
123 | |
---|
124 | </div> |
---|
125 | </body> |
---|