[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"> |
---|
[59] | 79 | <td valign="top" class="name"><label for="employeeID">employee ID:</label></td> |
---|
| 80 | <td valign="top" class="value ${hasErrors(bean:person,field:'employeeID','errors')}"> |
---|
| 81 | <input type="text" id="employeeID" name="employeeID" value="${person.employeeID?.encodeAsHTML()}"/> |
---|
| 82 | </td> |
---|
| 83 | </tr> |
---|
| 84 | |
---|
[150] | 85 | <tr class="prop"> |
---|
[164] | 86 | <td valign="top" class="name"> |
---|
| 87 | <label for="department">Department:</label> |
---|
| 88 | </td> |
---|
| 89 | <td valign="top" class="value ${hasErrors(bean:person,field:'department','errors')}"> |
---|
[168] | 90 | <g:select optionKey="id" from="${Department.list()}" name="department.id" value="${person?.department?.id}" noSelection="['null':'--None--']"></g:select> |
---|
[164] | 91 | </td> |
---|
| 92 | </tr> |
---|
| 93 | |
---|
| 94 | <tr class="prop"> |
---|
| 95 | <td valign="top" class="name"> |
---|
| 96 | <label for="personGroups">Groups:</label> |
---|
| 97 | </td> |
---|
| 98 | <td valign="top" class="value ${hasErrors(bean:person,field:'personGroups','errors')}"> |
---|
[166] | 99 | <g:helpBalloon class="helpballoon" code="person.personGroups" /> |
---|
[294] | 100 | <custom:checkBoxList name="personGroups" |
---|
| 101 | from="${PersonGroup.list().sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" |
---|
| 102 | value="${person?.personGroups?.collect{it.id}}" |
---|
| 103 | optionKey="id"/> |
---|
[164] | 104 | </td> |
---|
| 105 | </tr> |
---|
| 106 | |
---|
| 107 | <tr class="prop"> |
---|
[166] | 108 | <td valign="top" class="name" align="left"> |
---|
| 109 | Authorities: |
---|
| 110 | </td> |
---|
| 111 | <td valign="top" class="name" align="left"> |
---|
| 112 | <g:helpBalloon class="helpballoon" code="person.authorities" /> |
---|
| 113 | </td> |
---|
[150] | 114 | </tr> |
---|
[59] | 115 | |
---|
[150] | 116 | <g:each in="${authorityList}"> |
---|
| 117 | <tr> |
---|
[295] | 118 | <td valign="top" class="name" align="left">${it.description.encodeAsHTML()}</td> |
---|
[166] | 119 | <td align="left"> |
---|
| 120 | <g:checkBox name="${it.authority}" value="${it.authority == 'ROLE_AppUser'}"/> |
---|
| 121 | </td> |
---|
[150] | 122 | </tr> |
---|
| 123 | </g:each> |
---|
[59] | 124 | |
---|
[150] | 125 | </tbody> |
---|
| 126 | </table> |
---|
| 127 | </div> |
---|
[59] | 128 | |
---|
[150] | 129 | <div class="buttons"> |
---|
| 130 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
| 131 | </div> |
---|
[59] | 132 | |
---|
[150] | 133 | </g:form> |
---|
[59] | 134 | |
---|
[150] | 135 | </div> |
---|
[59] | 136 | </body> |
---|