[59] | 1 | <head> |
---|
| 2 | <meta name="layout" content="main" /> |
---|
| 3 | <title>Edit Person</title> |
---|
| 4 | </head> |
---|
| 5 | |
---|
| 6 | <body> |
---|
| 7 | |
---|
| 8 | <div class="nav"> |
---|
| 9 | <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span> |
---|
| 10 | <span class="menuButton"><g:link class="list" action="list">Person List</g:link></span> |
---|
| 11 | <span class="menuButton"><g:link class="create" action="create">New Person</g:link></span> |
---|
| 12 | </div> |
---|
| 13 | |
---|
| 14 | <div class="body"> |
---|
| 15 | <h1>Edit Person</h1> |
---|
| 16 | <g:if test="${flash.message}"> |
---|
| 17 | <div class="message">${flash.message}</div> |
---|
| 18 | </g:if> |
---|
| 19 | <g:hasErrors bean="${person}"> |
---|
| 20 | <div class="errors"> |
---|
| 21 | <g:renderErrors bean="${person}" as="list" /> |
---|
| 22 | </div> |
---|
| 23 | </g:hasErrors> |
---|
| 24 | |
---|
| 25 | <div class="prop"> |
---|
| 26 | <span class="name">ID:</span> |
---|
| 27 | <span class="value">${person.id}</span> |
---|
| 28 | </div> |
---|
| 29 | |
---|
| 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}" /> |
---|
[59] | 34 | <div class="dialog"> |
---|
| 35 | <table> |
---|
| 36 | <tbody> |
---|
| 37 | |
---|
| 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()}"/> |
---|
| 42 | </td> |
---|
| 43 | </tr> |
---|
| 44 | |
---|
| 45 | <tr class="prop"> |
---|
[65] | 46 | <td valign="top" class="name"><label for="firstName">First Name:</label></td> |
---|
[59] | 47 | <td valign="top" class="value ${hasErrors(bean:person,field:'firstName','errors')}"> |
---|
| 48 | <input type="text" id="firstName" name="firstName" value="${person.firstName?.encodeAsHTML()}"/> |
---|
| 49 | </td> |
---|
| 50 | </tr> |
---|
| 51 | |
---|
| 52 | <tr class="prop"> |
---|
[65] | 53 | <td valign="top" class="name"><label for="lastName">Last Name:</label></td> |
---|
[59] | 54 | <td valign="top" class="value ${hasErrors(bean:person,field:'lastName','errors')}"> |
---|
| 55 | <input type="text" id="lastName" name="lastName" value="${person.lastName?.encodeAsHTML()}"/> |
---|
| 56 | </td> |
---|
| 57 | </tr> |
---|
| 58 | |
---|
| 59 | <tr class="prop"> |
---|
[73] | 60 | <td valign="top" class="name"><label for="pass">Password:</label></td> |
---|
| 61 | <td valign="top" class="value ${hasErrors(bean:person,field:'pass','errors')}"> |
---|
| 62 | <input type="password" id="pass" name="pass"/> |
---|
[59] | 63 | </td> |
---|
| 64 | </tr> |
---|
| 65 | |
---|
| 66 | <tr class="prop"> |
---|
| 67 | <td valign="top" class="name"><label for="isActive">isActive:</label></td> |
---|
| 68 | <td valign="top" class="value ${hasErrors(bean:person,field:'isActive','errors')}"> |
---|
| 69 | <g:checkBox name="isActive" value="${person.isActive}"/> |
---|
| 70 | </td> |
---|
| 71 | </tr> |
---|
| 72 | |
---|
| 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> |
---|
| 79 | |
---|
| 80 | <tr class="prop"> |
---|
| 81 | <td valign="top" class="name"><label for="email">Email:</label></td> |
---|
| 82 | <td valign="top" class="value ${hasErrors(bean:person,field:'email','errors')}"> |
---|
| 83 | <input type="text" id="email" name="email" value="${person?.email?.encodeAsHTML()}"/> |
---|
| 84 | </td> |
---|
| 85 | </tr> |
---|
| 86 | |
---|
| 87 | <tr class="prop"> |
---|
| 88 | <td valign="top" class="name"><label for="emailShow">Show Email:</label></td> |
---|
| 89 | <td valign="top" class="value ${hasErrors(bean:person,field:'emailShow','errors')}"> |
---|
| 90 | <g:checkBox name="emailShow" value="${person.emailShow}"/> |
---|
| 91 | </td> |
---|
| 92 | </tr> |
---|
| 93 | |
---|
| 94 | <tr class="prop"> |
---|
| 95 | <td valign="top" class="name"><label for="employeeID">employee ID:</label></td> |
---|
| 96 | <td valign="top" class="value ${hasErrors(bean:person,field:'employeeID','errors')}"> |
---|
| 97 | <input type="text" id="employeeID" name="employeeID" value="${person.employeeID?.encodeAsHTML()}"/> |
---|
| 98 | </td> |
---|
| 99 | </tr> |
---|
| 100 | |
---|
| 101 | <tr class="prop"> |
---|
| 102 | <td valign="top" class="name"><label for="authorities">Authorities:</label></td> |
---|
| 103 | <td valign="top" class="value ${hasErrors(bean:person,field:'authorities','errors')}"> |
---|
| 104 | <ul> |
---|
| 105 | <g:each var="entry" in="${roleMap}"> |
---|
| 106 | <li>${entry.key.authority.encodeAsHTML()} |
---|
| 107 | <g:checkBox name="${entry.key.authority}" value="${entry.value}"/> |
---|
| 108 | </li> |
---|
| 109 | </g:each> |
---|
| 110 | </ul> |
---|
| 111 | </td> |
---|
| 112 | </tr> |
---|
| 113 | |
---|
| 114 | </tbody> |
---|
| 115 | </table> |
---|
| 116 | </div> |
---|
| 117 | |
---|
| 118 | <div class="buttons"> |
---|
| 119 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
| 120 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 121 | </div> |
---|
| 122 | |
---|
| 123 | </g:form> |
---|
| 124 | |
---|
| 125 | </div> |
---|
| 126 | </body> |
---|