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