[59] | 1 | <head> |
---|
[150] | 2 | <meta name="layout" content="main" /> |
---|
| 3 | <title>Edit Person</title> |
---|
[147] | 4 | <nav:resources override="true"/> |
---|
[59] | 5 | </head> |
---|
| 6 | |
---|
| 7 | <body> |
---|
| 8 | |
---|
[150] | 9 | <div class="nav"> |
---|
[147] | 10 | <nav:renderSubItems group="navAlt"/> |
---|
[150] | 11 | </div> |
---|
[59] | 12 | |
---|
[150] | 13 | <div class="body"> |
---|
[477] | 14 | <g:render template="/shared/messages" /> |
---|
[150] | 15 | <g:hasErrors bean="${person}"> |
---|
| 16 | <div class="errors"> |
---|
| 17 | <g:renderErrors bean="${person}" as="list" /> |
---|
| 18 | </div> |
---|
| 19 | </g:hasErrors> |
---|
[59] | 20 | |
---|
[150] | 21 | <!--<div class="prop"> |
---|
| 22 | <span class="name">ID: ${person.id}</span> |
---|
| 23 | </div>--> |
---|
[59] | 24 | |
---|
[150] | 25 | <g:form> |
---|
| 26 | <input type="hidden" name="id" value="${person.id}" /> |
---|
| 27 | <input type="hidden" name="version" value="${person.version}" /> |
---|
[73] | 28 | <input type="hidden" name="password" value="${person.password}" /> |
---|
[150] | 29 | <div class="dialog"> |
---|
| 30 | <table> |
---|
| 31 | <tbody> |
---|
[59] | 32 | |
---|
[150] | 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()}"/> |
---|
[166] | 37 | <g:helpBalloon class="helpballoon" code="person.loginName" /> |
---|
[150] | 38 | </td> |
---|
| 39 | </tr> |
---|
[59] | 40 | |
---|
[150] | 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()}"/> |
---|
[166] | 45 | <g:helpBalloon class="helpballoon" code="person.firstName" /> |
---|
[150] | 46 | </td> |
---|
| 47 | </tr> |
---|
[59] | 48 | |
---|
| 49 | <tr class="prop"> |
---|
[65] | 50 | <td valign="top" class="name"><label for="lastName">Last Name:</label></td> |
---|
[59] | 51 | <td valign="top" class="value ${hasErrors(bean:person,field:'lastName','errors')}"> |
---|
| 52 | <input type="text" id="lastName" name="lastName" value="${person.lastName?.encodeAsHTML()}"/> |
---|
[166] | 53 | <g:helpBalloon class="helpballoon" code="person.lastName" /> |
---|
[59] | 54 | </td> |
---|
| 55 | </tr> |
---|
| 56 | |
---|
[150] | 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()}"/> |
---|
[166] | 61 | <g:helpBalloon class="helpballoon" code="person.password" /> |
---|
[150] | 62 | </td> |
---|
| 63 | </tr> |
---|
[59] | 64 | |
---|
[150] | 65 | <tr class="prop"> |
---|
[166] | 66 | <td valign="top" class="name"><label for="isActive">Active:</label></td> |
---|
[150] | 67 | <td valign="top" class="value ${hasErrors(bean:person,field:'isActive','errors')}"> |
---|
| 68 | <g:checkBox name="isActive" value="${person.isActive}"/> |
---|
[166] | 69 | <g:helpBalloon class="helpballoon" code="person.isActive" /> |
---|
[150] | 70 | </td> |
---|
| 71 | </tr> |
---|
[59] | 72 | |
---|
[150] | 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> |
---|
[59] | 79 | |
---|
[150] | 80 | <tr class="prop"> |
---|
[397] | 81 | <td valign="top" class="name"> |
---|
[402] | 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"> |
---|
[397] | 98 | <label for="addresses">Addresses:</label> |
---|
| 99 | </td> |
---|
| 100 | <td valign="top" class="value"> |
---|
| 101 | <ul> |
---|
[402] | 102 | <g:each var="i" in="${person?.addresses}"> |
---|
[397] | 103 | <li><g:link controller="addressDetailed" action="show" id="${i.id}"> |
---|
| 104 | ${i?.encodeAsHTML()} |
---|
| 105 | </g:link></li> |
---|
| 106 | </g:each> |
---|
| 107 | </ul> |
---|
[402] | 108 | <g:link controller="addressDetailed" params="['person.id':person?.id]" action="create">+Add Address</g:link> |
---|
[397] | 109 | </td> |
---|
| 110 | </tr> |
---|
| 111 | |
---|
| 112 | <tr class="prop"> |
---|
[59] | 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 | |
---|
[97] | 119 | <tr class="prop"> |
---|
[164] | 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')}"> |
---|
[168] | 124 | <g:select optionKey="id" from="${Department.list()}" name="department.id" value="${person?.department?.id}" noSelection="['null':'--None--']"></g:select> |
---|
[164] | 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')}"> |
---|
[166] | 133 | <g:helpBalloon class="helpballoon" code="person.personGroups" /> |
---|
[294] | 134 | <custom:checkBoxList name="personGroups" |
---|
[471] | 135 | from="${PersonGroup.findAllByIsActive(true)}" |
---|
[294] | 136 | value="${person?.personGroups?.collect{it.id}}" |
---|
[471] | 137 | optionKey="id" |
---|
| 138 | sortBy="name" |
---|
| 139 | linkController="personGroupDetailed" |
---|
| 140 | linkAction="show"/> |
---|
[506] | 141 | <g:link controller="personGroupDetailed" action="create">+Add Group</g:link> |
---|
[164] | 142 | </td> |
---|
| 143 | </tr> |
---|
| 144 | |
---|
| 145 | <tr class="prop"> |
---|
[166] | 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> |
---|
[97] | 152 | </tr> |
---|
[59] | 153 | |
---|
[97] | 154 | <g:each var="entry" in="${roleMap}"> |
---|
| 155 | <tr> |
---|
[295] | 156 | <td valign="top" class="name" align="left">${entry.key.description.encodeAsHTML()}</td> |
---|
[97] | 157 | <td align="left"><g:checkBox name="${entry.key.authority}" value="${entry.value}"/></td> |
---|
| 158 | </tr> |
---|
| 159 | </g:each> |
---|
| 160 | |
---|
[150] | 161 | </tbody> |
---|
| 162 | </table> |
---|
| 163 | </div> |
---|
[59] | 164 | |
---|
[150] | 165 | <div class="buttons"> |
---|
| 166 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
[506] | 167 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
[150] | 168 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 169 | </div> |
---|
[59] | 170 | |
---|
[150] | 171 | </g:form> |
---|
[59] | 172 | |
---|
[150] | 173 | </div> |
---|
[59] | 174 | </body> |
---|