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