[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"> |
---|
| 86 | <td valign="top" class="name"><label for="email">Email:</label></td> |
---|
| 87 | <td valign="top" class="value ${hasErrors(bean:person,field:'email','errors')}"> |
---|
| 88 | <input type="text" id="email" name="email" value="${person?.email?.encodeAsHTML()}"/> |
---|
| 89 | </td> |
---|
| 90 | </tr> |
---|
[59] | 91 | |
---|
[150] | 92 | <tr class="prop"> |
---|
| 93 | <td valign="top" class="name"><label for="emailShow">Show Email:</label></td> |
---|
| 94 | <td valign="top" class="value ${hasErrors(bean:person,field:'emailShow','errors')}"> |
---|
| 95 | <g:checkBox name="emailShow" value="${person.emailShow}"/> |
---|
| 96 | </td> |
---|
| 97 | </tr> |
---|
[59] | 98 | |
---|
| 99 | <tr class="prop"> |
---|
| 100 | <td valign="top" class="name"><label for="employeeID">employee ID:</label></td> |
---|
| 101 | <td valign="top" class="value ${hasErrors(bean:person,field:'employeeID','errors')}"> |
---|
| 102 | <input type="text" id="employeeID" name="employeeID" value="${person.employeeID?.encodeAsHTML()}"/> |
---|
| 103 | </td> |
---|
| 104 | </tr> |
---|
| 105 | |
---|
[97] | 106 | <tr class="prop"> |
---|
[164] | 107 | <td valign="top" class="name"> |
---|
| 108 | <label for="department">Department:</label> |
---|
| 109 | </td> |
---|
| 110 | <td valign="top" class="value ${hasErrors(bean:person,field:'department','errors')}"> |
---|
[168] | 111 | <g:select optionKey="id" from="${Department.list()}" name="department.id" value="${person?.department?.id}" noSelection="['null':'--None--']"></g:select> |
---|
[164] | 112 | </td> |
---|
| 113 | </tr> |
---|
| 114 | |
---|
| 115 | <tr class="prop"> |
---|
| 116 | <td valign="top" class="name"> |
---|
| 117 | <label for="personGroups">Groups:</label> |
---|
| 118 | </td> |
---|
| 119 | <td valign="top" class="value ${hasErrors(bean:person,field:'personGroups','errors')}"> |
---|
[166] | 120 | <g:helpBalloon class="helpballoon" code="person.personGroups" /> |
---|
[294] | 121 | <custom:checkBoxList name="personGroups" |
---|
| 122 | from="${PersonGroup.list().sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
| 123 | value="${person?.personGroups?.collect{it.id}}" |
---|
| 124 | optionKey="id"/> |
---|
[164] | 125 | </td> |
---|
| 126 | </tr> |
---|
| 127 | |
---|
| 128 | <tr class="prop"> |
---|
[166] | 129 | <td valign="top" class="name" align="left"> |
---|
| 130 | Authorities: |
---|
| 131 | </td> |
---|
| 132 | <td valign="top" class="name" align="left"> |
---|
| 133 | <g:helpBalloon class="helpballoon" code="person.authorities" /> |
---|
| 134 | </td> |
---|
[97] | 135 | </tr> |
---|
[59] | 136 | |
---|
[97] | 137 | <g:each var="entry" in="${roleMap}"> |
---|
| 138 | <tr> |
---|
[295] | 139 | <td valign="top" class="name" align="left">${entry.key.description.encodeAsHTML()}</td> |
---|
[97] | 140 | <td align="left"><g:checkBox name="${entry.key.authority}" value="${entry.value}"/></td> |
---|
| 141 | </tr> |
---|
| 142 | </g:each> |
---|
| 143 | |
---|
[150] | 144 | </tbody> |
---|
| 145 | </table> |
---|
| 146 | </div> |
---|
[59] | 147 | |
---|
[150] | 148 | <div class="buttons"> |
---|
| 149 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
| 150 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 151 | </div> |
---|
[59] | 152 | |
---|
[150] | 153 | </g:form> |
---|
[59] | 154 | |
---|
[150] | 155 | </div> |
---|
[59] | 156 | </body> |
---|