| 1 |  | 
|---|
| 2 |  | 
|---|
| 3 | <html> | 
|---|
| 4 |     <head> | 
|---|
| 5 |         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | 
|---|
| 6 |         <meta name="layout" content="main" /> | 
|---|
| 7 |         <title>Edit Person</title> | 
|---|
| 8 |     </head> | 
|---|
| 9 |     <body> | 
|---|
| 10 |         <div class="nav"> | 
|---|
| 11 |             <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span> | 
|---|
| 12 |             <span class="menuButton"><g:link class="list" action="list">Person List</g:link></span> | 
|---|
| 13 |             <span class="menuButton"><g:link class="create" action="create">New Person</g:link></span> | 
|---|
| 14 |         </div> | 
|---|
| 15 |         <div class="body"> | 
|---|
| 16 |             <h1>Edit Person</h1> | 
|---|
| 17 |             <g:if test="${flash.message}"> | 
|---|
| 18 |             <div class="message">${flash.message}</div> | 
|---|
| 19 |             </g:if> | 
|---|
| 20 |             <g:hasErrors bean="${personInstance}"> | 
|---|
| 21 |             <div class="errors"> | 
|---|
| 22 |                 <g:renderErrors bean="${personInstance}" as="list" /> | 
|---|
| 23 |             </div> | 
|---|
| 24 |             </g:hasErrors> | 
|---|
| 25 |             <g:form method="post" > | 
|---|
| 26 |                 <input type="hidden" name="id" value="${personInstance?.id}" /> | 
|---|
| 27 |                 <div class="dialog"> | 
|---|
| 28 |                     <table> | 
|---|
| 29 |                         <tbody> | 
|---|
| 30 |                          | 
|---|
| 31 |                             <tr class="prop"> | 
|---|
| 32 |                                 <td valign="top" class="name"> | 
|---|
| 33 |                                     <label for="firstName">First Name:</label> | 
|---|
| 34 |                                 </td> | 
|---|
| 35 |                                 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'firstName','errors')}"> | 
|---|
| 36 |                                     <input type="text" id="firstName" name="firstName" value="${fieldValue(bean:personInstance,field:'firstName')}"/> | 
|---|
| 37 |                                 </td> | 
|---|
| 38 |                             </tr>  | 
|---|
| 39 |                          | 
|---|
| 40 |                             <tr class="prop"> | 
|---|
| 41 |                                 <td valign="top" class="name"> | 
|---|
| 42 |                                     <label for="lastName">Last Name:</label> | 
|---|
| 43 |                                 </td> | 
|---|
| 44 |                                 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'lastName','errors')}"> | 
|---|
| 45 |                                     <input type="text" id="lastName" name="lastName" value="${fieldValue(bean:personInstance,field:'lastName')}"/> | 
|---|
| 46 |                                 </td> | 
|---|
| 47 |                             </tr>  | 
|---|
| 48 |                          | 
|---|
| 49 |                             <tr class="prop"> | 
|---|
| 50 |                                 <td valign="top" class="name"> | 
|---|
| 51 |                                     <label for="employeeID">Employee ID:</label> | 
|---|
| 52 |                                 </td> | 
|---|
| 53 |                                 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'employeeID','errors')}"> | 
|---|
| 54 |                                     <input type="text" id="employeeID" name="employeeID" value="${fieldValue(bean:personInstance,field:'employeeID')}" /> | 
|---|
| 55 |                                 </td> | 
|---|
| 56 |                             </tr>  | 
|---|
| 57 |                          | 
|---|
| 58 |                             <tr class="prop"> | 
|---|
| 59 |                                 <td valign="top" class="name"> | 
|---|
| 60 |                                     <label for="entries">Entries:</label> | 
|---|
| 61 |                                 </td> | 
|---|
| 62 |                                 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'entries','errors')}"> | 
|---|
| 63 |                                      | 
|---|
| 64 | <ul> | 
|---|
| 65 | <g:each var="e" in="${personInstance?.entries?}"> | 
|---|
| 66 |     <li><g:link controller="entry" action="show" id="${e.id}">${e?.encodeAsHTML()}</g:link></li> | 
|---|
| 67 | </g:each> | 
|---|
| 68 | </ul> | 
|---|
| 69 | <g:link controller="entry" params="['person.id':personInstance?.id]" action="create">Add Entry</g:link> | 
|---|
| 70 |  | 
|---|
| 71 |                                 </td> | 
|---|
| 72 |                             </tr>  | 
|---|
| 73 |                          | 
|---|
| 74 |                             <tr class="prop"> | 
|---|
| 75 |                                 <td valign="top" class="name"> | 
|---|
| 76 |                                     <label for="isActive">Is Active:</label> | 
|---|
| 77 |                                 </td> | 
|---|
| 78 |                                 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'isActive','errors')}"> | 
|---|
| 79 |                                     <g:checkBox name="isActive" value="${personInstance?.isActive}" ></g:checkBox> | 
|---|
| 80 |                                 </td> | 
|---|
| 81 |                             </tr>  | 
|---|
| 82 |                          | 
|---|
| 83 |                             <tr class="prop"> | 
|---|
| 84 |                                 <td valign="top" class="name"> | 
|---|
| 85 |                                     <label for="modifications">Modifications:</label> | 
|---|
| 86 |                                 </td> | 
|---|
| 87 |                                 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'modifications','errors')}"> | 
|---|
| 88 |                                      | 
|---|
| 89 | <ul> | 
|---|
| 90 | <g:each var="m" in="${personInstance?.modifications?}"> | 
|---|
| 91 |     <li><g:link controller="modification" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> | 
|---|
| 92 | </g:each> | 
|---|
| 93 | </ul> | 
|---|
| 94 | <g:link controller="modification" params="['person.id':personInstance?.id]" action="create">Add Modification</g:link> | 
|---|
| 95 |  | 
|---|
| 96 |                                 </td> | 
|---|
| 97 |                             </tr>  | 
|---|
| 98 |                          | 
|---|
| 99 |                             <tr class="prop"> | 
|---|
| 100 |                                 <td valign="top" class="name"> | 
|---|
| 101 |                                     <label for="personGroup">Person Group:</label> | 
|---|
| 102 |                                 </td> | 
|---|
| 103 |                                 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'personGroup','errors')}"> | 
|---|
| 104 |                                     <g:select optionKey="id" from="${PersonGroup.list()}" name="personGroup.id" value="${personInstance?.personGroup?.id}" ></g:select> | 
|---|
| 105 |                                 </td> | 
|---|
| 106 |                             </tr>  | 
|---|
| 107 |                          | 
|---|
| 108 |                             <tr class="prop"> | 
|---|
| 109 |                                 <td valign="top" class="name"> | 
|---|
| 110 |                                     <label for="personGroups">Person Groups:</label> | 
|---|
| 111 |                                 </td> | 
|---|
| 112 |                                 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'personGroups','errors')}"> | 
|---|
| 113 |                                      | 
|---|
| 114 | <ul> | 
|---|
| 115 | <g:each var="p" in="${personInstance?.personGroups?}"> | 
|---|
| 116 |     <li><g:link controller="personGroup" action="show" id="${p.id}">${p?.encodeAsHTML()}</g:link></li> | 
|---|
| 117 | </g:each> | 
|---|
| 118 | </ul> | 
|---|
| 119 | <g:link controller="personGroup" params="['person.id':personInstance?.id]" action="create">Add PersonGroup</g:link> | 
|---|
| 120 |  | 
|---|
| 121 |                                 </td> | 
|---|
| 122 |                             </tr>  | 
|---|
| 123 |                          | 
|---|
| 124 |                             <tr class="prop"> | 
|---|
| 125 |                                 <td valign="top" class="name"> | 
|---|
| 126 |                                     <label for="tasks">Tasks:</label> | 
|---|
| 127 |                                 </td> | 
|---|
| 128 |                                 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'tasks','errors')}"> | 
|---|
| 129 |                                      | 
|---|
| 130 | <ul> | 
|---|
| 131 | <g:each var="t" in="${personInstance?.tasks?}"> | 
|---|
| 132 |     <li><g:link controller="task" action="show" id="${t.id}">${t?.encodeAsHTML()}</g:link></li> | 
|---|
| 133 | </g:each> | 
|---|
| 134 | </ul> | 
|---|
| 135 | <g:link controller="task" params="['person.id':personInstance?.id]" action="create">Add Task</g:link> | 
|---|
| 136 |  | 
|---|
| 137 |                                 </td> | 
|---|
| 138 |                             </tr>  | 
|---|
| 139 |                          | 
|---|
| 140 |                         </tbody> | 
|---|
| 141 |                     </table> | 
|---|
| 142 |                 </div> | 
|---|
| 143 |                 <div class="buttons"> | 
|---|
| 144 |                     <span class="button"><g:actionSubmit class="save" value="Update" /></span> | 
|---|
| 145 |                     <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> | 
|---|
| 146 |                 </div> | 
|---|
| 147 |             </g:form> | 
|---|
| 148 |         </div> | 
|---|
| 149 |     </body> | 
|---|
| 150 | </html> | 
|---|