[21] | 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')}"> |
---|
[35] | 36 | <input type="text" maxlength="50" id="firstName" name="firstName" value="${fieldValue(bean:personInstance,field:'firstName')}"/> |
---|
[21] | 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')}"> |
---|
[35] | 45 | <input type="text" maxlength="50" id="lastName" name="lastName" value="${fieldValue(bean:personInstance,field:'lastName')}"/> |
---|
[21] | 46 | </td> |
---|
| 47 | </tr> |
---|
| 48 | |
---|
| 49 | <tr class="prop"> |
---|
| 50 | <td valign="top" class="name"> |
---|
[40] | 51 | <label for="userId">User Id:</label> |
---|
| 52 | </td> |
---|
| 53 | <td valign="top" class="value ${hasErrors(bean:personInstance,field:'userId','errors')}"> |
---|
| 54 | <input type="text" maxlength="8" id="userId" name="userId" value="${fieldValue(bean:personInstance,field:'userId')}"/> |
---|
| 55 | </td> |
---|
| 56 | </tr> |
---|
| 57 | |
---|
| 58 | <tr class="prop"> |
---|
| 59 | <td valign="top" class="name"> |
---|
| 60 | <label for="password">Password:</label> |
---|
| 61 | </td> |
---|
| 62 | <td valign="top" class="value ${hasErrors(bean:personInstance,field:'password','errors')}"> |
---|
| 63 | <input type="text" maxlength="8" id="password" name="password" value="${fieldValue(bean:personInstance,field:'password')}"/> |
---|
| 64 | </td> |
---|
| 65 | </tr> |
---|
| 66 | |
---|
| 67 | <tr class="prop"> |
---|
| 68 | <td valign="top" class="name"> |
---|
[21] | 69 | <label for="employeeID">Employee ID:</label> |
---|
| 70 | </td> |
---|
| 71 | <td valign="top" class="value ${hasErrors(bean:personInstance,field:'employeeID','errors')}"> |
---|
| 72 | <input type="text" id="employeeID" name="employeeID" value="${fieldValue(bean:personInstance,field:'employeeID')}" /> |
---|
| 73 | </td> |
---|
| 74 | </tr> |
---|
| 75 | |
---|
| 76 | <tr class="prop"> |
---|
| 77 | <td valign="top" class="name"> |
---|
| 78 | <label for="entries">Entries:</label> |
---|
| 79 | </td> |
---|
| 80 | <td valign="top" class="value ${hasErrors(bean:personInstance,field:'entries','errors')}"> |
---|
| 81 | |
---|
| 82 | <ul> |
---|
| 83 | <g:each var="e" in="${personInstance?.entries?}"> |
---|
| 84 | <li><g:link controller="entry" action="show" id="${e.id}">${e?.encodeAsHTML()}</g:link></li> |
---|
| 85 | </g:each> |
---|
| 86 | </ul> |
---|
| 87 | <g:link controller="entry" params="['person.id':personInstance?.id]" action="create">Add Entry</g:link> |
---|
| 88 | |
---|
| 89 | </td> |
---|
| 90 | </tr> |
---|
| 91 | |
---|
| 92 | <tr class="prop"> |
---|
| 93 | <td valign="top" class="name"> |
---|
| 94 | <label for="isActive">Is Active:</label> |
---|
| 95 | </td> |
---|
| 96 | <td valign="top" class="value ${hasErrors(bean:personInstance,field:'isActive','errors')}"> |
---|
| 97 | <g:checkBox name="isActive" value="${personInstance?.isActive}" ></g:checkBox> |
---|
| 98 | </td> |
---|
| 99 | </tr> |
---|
| 100 | |
---|
| 101 | <tr class="prop"> |
---|
| 102 | <td valign="top" class="name"> |
---|
| 103 | <label for="modifications">Modifications:</label> |
---|
| 104 | </td> |
---|
| 105 | <td valign="top" class="value ${hasErrors(bean:personInstance,field:'modifications','errors')}"> |
---|
| 106 | |
---|
| 107 | <ul> |
---|
| 108 | <g:each var="m" in="${personInstance?.modifications?}"> |
---|
| 109 | <li><g:link controller="modification" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
| 110 | </g:each> |
---|
| 111 | </ul> |
---|
| 112 | <g:link controller="modification" params="['person.id':personInstance?.id]" action="create">Add Modification</g:link> |
---|
| 113 | |
---|
| 114 | </td> |
---|
| 115 | </tr> |
---|
| 116 | |
---|
| 117 | <tr class="prop"> |
---|
| 118 | <td valign="top" class="name"> |
---|
| 119 | <label for="personGroups">Person Groups:</label> |
---|
| 120 | </td> |
---|
| 121 | <td valign="top" class="value ${hasErrors(bean:personInstance,field:'personGroups','errors')}"> |
---|
| 122 | |
---|
| 123 | <ul> |
---|
| 124 | <g:each var="p" in="${personInstance?.personGroups?}"> |
---|
| 125 | <li><g:link controller="personGroup" action="show" id="${p.id}">${p?.encodeAsHTML()}</g:link></li> |
---|
| 126 | </g:each> |
---|
| 127 | </ul> |
---|
| 128 | <g:link controller="personGroup" params="['person.id':personInstance?.id]" action="create">Add PersonGroup</g:link> |
---|
| 129 | |
---|
| 130 | </td> |
---|
| 131 | </tr> |
---|
| 132 | |
---|
| 133 | <tr class="prop"> |
---|
| 134 | <td valign="top" class="name"> |
---|
| 135 | <label for="tasks">Tasks:</label> |
---|
| 136 | </td> |
---|
| 137 | <td valign="top" class="value ${hasErrors(bean:personInstance,field:'tasks','errors')}"> |
---|
| 138 | |
---|
| 139 | <ul> |
---|
| 140 | <g:each var="t" in="${personInstance?.tasks?}"> |
---|
| 141 | <li><g:link controller="task" action="show" id="${t.id}">${t?.encodeAsHTML()}</g:link></li> |
---|
| 142 | </g:each> |
---|
| 143 | </ul> |
---|
| 144 | <g:link controller="task" params="['person.id':personInstance?.id]" action="create">Add Task</g:link> |
---|
| 145 | |
---|
| 146 | </td> |
---|
| 147 | </tr> |
---|
| 148 | |
---|
| 149 | </tbody> |
---|
| 150 | </table> |
---|
| 151 | </div> |
---|
| 152 | <div class="buttons"> |
---|
| 153 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
| 154 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 155 | </div> |
---|
| 156 | </g:form> |
---|
| 157 | </div> |
---|
| 158 | </body> |
---|
| 159 | </html> |
---|