[59] | 1 | <head> |
---|
[150] | 2 | <meta name="layout" content="main" /> |
---|
| 3 | <title>Create 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> |
---|
| 25 | <g:form action="save"> |
---|
| 26 | <div class="dialog"> |
---|
| 27 | <table> |
---|
| 28 | <tbody> |
---|
[59] | 29 | |
---|
[150] | 30 | <tr class="prop"> |
---|
| 31 | <td valign="top" class="name"><label for="loginName">Login Name:</label></td> |
---|
| 32 | <td valign="top" class="value ${hasErrors(bean:person,field:'loginName','errors')}"> |
---|
| 33 | <input type="text" id="loginName" name="loginName" value="${person.loginName?.encodeAsHTML()}"/> |
---|
[166] | 34 | <g:helpBalloon class="helpballoon" code="person.loginName" /> |
---|
[150] | 35 | </td> |
---|
| 36 | </tr> |
---|
[59] | 37 | |
---|
[150] | 38 | <tr class="prop"> |
---|
| 39 | <td valign="top" class="name"><label for="firstName">First Name:</label></td> |
---|
| 40 | <td valign="top" class="value ${hasErrors(bean:person,field:'firstName','errors')}"> |
---|
| 41 | <input type="text" id="firstName" name="firstName" value="${person.firstName?.encodeAsHTML()}"/> |
---|
[166] | 42 | <g:helpBalloon class="helpballoon" code="person.firstName" /> |
---|
[150] | 43 | </td> |
---|
| 44 | </tr> |
---|
[59] | 45 | |
---|
| 46 | <tr class="prop"> |
---|
| 47 | <td valign="top" class="name"><label for="lastName">Last Name:</label></td> |
---|
| 48 | <td valign="top" class="value ${hasErrors(bean:person,field:'lastName','errors')}"> |
---|
| 49 | <input type="text" id="lastName" name="lastName" value="${person.lastName?.encodeAsHTML()}"/> |
---|
[166] | 50 | <g:helpBalloon class="helpballoon" code="person.lastName" /> |
---|
[59] | 51 | </td> |
---|
| 52 | </tr> |
---|
| 53 | |
---|
| 54 | |
---|
[150] | 55 | <tr class="prop"> |
---|
| 56 | <td valign="top" class="name"><label for="pass">Password:</label></td> |
---|
| 57 | <td valign="top" class="value ${hasErrors(bean:person,field:'pass','errors')}"> |
---|
| 58 | <input type="password" id="pass" name="pass"/> |
---|
[166] | 59 | <g:helpBalloon class="helpballoon" code="person.password" /> |
---|
[150] | 60 | </td> |
---|
| 61 | </tr> |
---|
[59] | 62 | |
---|
[150] | 63 | <tr class="prop"> |
---|
[166] | 64 | <td valign="top" class="name"><label for="isActive">Active:</label></td> |
---|
[150] | 65 | <td valign="top" class="value ${hasErrors(bean:person,field:'isActive','errors')}"> |
---|
| 66 | <g:checkBox name="isActive" value="${person.isActive}" ></g:checkBox> |
---|
[166] | 67 | <g:helpBalloon class="helpballoon" code="person.isActive" /> |
---|
[150] | 68 | </td> |
---|
| 69 | </tr> |
---|
[59] | 70 | |
---|
[150] | 71 | <tr class="prop"> |
---|
| 72 | <td valign="top" class="name"><label for="description">Description:</label></td> |
---|
| 73 | <td valign="top" class="value ${hasErrors(bean:person,field:'description','errors')}"> |
---|
| 74 | <input type="text" id="description" name="description" value="${person.description?.encodeAsHTML()}"/> |
---|
| 75 | </td> |
---|
| 76 | </tr> |
---|
[59] | 77 | |
---|
[150] | 78 | <tr class="prop"> |
---|
| 79 | <td valign="top" class="name"><label for="email">Email:</label></td> |
---|
| 80 | <td valign="top" class="value ${hasErrors(bean:person,field:'email','errors')}"> |
---|
| 81 | <input type="text" id="email" name="email" value="${person.email?.encodeAsHTML()}"/> |
---|
| 82 | </td> |
---|
| 83 | </tr> |
---|
[59] | 84 | |
---|
[150] | 85 | <tr class="prop"> |
---|
| 86 | <td valign="top" class="name"><label for="emailShow">Show Email:</label></td> |
---|
| 87 | <td valign="top" class="value ${hasErrors(bean:person,field:'emailShow','errors')}"> |
---|
| 88 | <g:checkBox name="emailShow" value="${person.emailShow}"/> |
---|
| 89 | </td> |
---|
| 90 | </tr> |
---|
[59] | 91 | |
---|
| 92 | <tr class="prop"> |
---|
| 93 | <td valign="top" class="name"><label for="employeeID">employee ID:</label></td> |
---|
| 94 | <td valign="top" class="value ${hasErrors(bean:person,field:'employeeID','errors')}"> |
---|
| 95 | <input type="text" id="employeeID" name="employeeID" value="${person.employeeID?.encodeAsHTML()}"/> |
---|
| 96 | </td> |
---|
| 97 | </tr> |
---|
| 98 | |
---|
[150] | 99 | <tr class="prop"> |
---|
[164] | 100 | <td valign="top" class="name"> |
---|
| 101 | <label for="department">Department:</label> |
---|
| 102 | </td> |
---|
| 103 | <td valign="top" class="value ${hasErrors(bean:person,field:'department','errors')}"> |
---|
[168] | 104 | <g:select optionKey="id" from="${Department.list()}" name="department.id" value="${person?.department?.id}" noSelection="['null':'--None--']"></g:select> |
---|
[164] | 105 | </td> |
---|
| 106 | </tr> |
---|
| 107 | |
---|
| 108 | <tr class="prop"> |
---|
| 109 | <td valign="top" class="name"> |
---|
| 110 | <label for="personGroups">Groups:</label> |
---|
| 111 | </td> |
---|
| 112 | <td valign="top" class="value ${hasErrors(bean:person,field:'personGroups','errors')}"> |
---|
[166] | 113 | <g:select id="personGroups" name="personGroups" |
---|
[164] | 114 | from="${PersonGroup.list()}" |
---|
[166] | 115 | optionKey="id" size="5" multiple="yes" |
---|
| 116 | value="${person?.personGroups?.id}" noSelection="['':'--None--']"/> |
---|
| 117 | <g:helpBalloon class="helpballoon" code="person.personGroups" /> |
---|
[164] | 118 | </td> |
---|
| 119 | </tr> |
---|
| 120 | |
---|
| 121 | <tr class="prop"> |
---|
[166] | 122 | <td valign="top" class="name" align="left"> |
---|
| 123 | Authorities: |
---|
| 124 | </td> |
---|
| 125 | <td valign="top" class="name" align="left"> |
---|
| 126 | <g:helpBalloon class="helpballoon" code="person.authorities" /> |
---|
| 127 | </td> |
---|
[150] | 128 | </tr> |
---|
[59] | 129 | |
---|
[150] | 130 | <g:each in="${authorityList}"> |
---|
| 131 | <tr> |
---|
| 132 | <td valign="top" class="name" align="left">${it.authority.encodeAsHTML()}</td> |
---|
[166] | 133 | <td align="left"> |
---|
| 134 | <g:checkBox name="${it.authority}" value="${it.authority == 'ROLE_AppUser'}"/> |
---|
| 135 | </td> |
---|
[150] | 136 | </tr> |
---|
| 137 | </g:each> |
---|
[59] | 138 | |
---|
[150] | 139 | </tbody> |
---|
| 140 | </table> |
---|
| 141 | </div> |
---|
[59] | 142 | |
---|
[150] | 143 | <div class="buttons"> |
---|
| 144 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
| 145 | </div> |
---|
[59] | 146 | |
---|
[150] | 147 | </g:form> |
---|
[59] | 148 | |
---|
[150] | 149 | </div> |
---|
[59] | 150 | </body> |
---|