[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" |
---|
[506] | 96 | from="${PersonGroup.findAllByIsActive(true)}" |
---|
[294] | 97 | value="${person?.personGroups?.collect{it.id}}" |
---|
[506] | 98 | optionKey="id" |
---|
| 99 | sortBy="name" |
---|
| 100 | linkController="personGroupDetailed" |
---|
| 101 | linkAction="show"/> |
---|
| 102 | <g:link controller="personGroupDetailed" action="create">+Add Group</g:link> |
---|
[164] | 103 | </td> |
---|
| 104 | </tr> |
---|
| 105 | |
---|
| 106 | <tr class="prop"> |
---|
[166] | 107 | <td valign="top" class="name" align="left"> |
---|
| 108 | Authorities: |
---|
| 109 | </td> |
---|
| 110 | <td valign="top" class="name" align="left"> |
---|
| 111 | <g:helpBalloon class="helpballoon" code="person.authorities" /> |
---|
| 112 | </td> |
---|
[150] | 113 | </tr> |
---|
[59] | 114 | |
---|
[150] | 115 | <g:each in="${authorityList}"> |
---|
| 116 | <tr> |
---|
[295] | 117 | <td valign="top" class="name" align="left">${it.description.encodeAsHTML()}</td> |
---|
[166] | 118 | <td align="left"> |
---|
| 119 | <g:checkBox name="${it.authority}" value="${it.authority == 'ROLE_AppUser'}"/> |
---|
| 120 | </td> |
---|
[150] | 121 | </tr> |
---|
| 122 | </g:each> |
---|
[59] | 123 | |
---|
[150] | 124 | </tbody> |
---|
| 125 | </table> |
---|
| 126 | </div> |
---|
[59] | 127 | |
---|
[150] | 128 | <div class="buttons"> |
---|
| 129 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
| 130 | </div> |
---|
[59] | 131 | |
---|
[150] | 132 | </g:form> |
---|
[59] | 133 | |
---|
[150] | 134 | </div> |
---|
[59] | 135 | </body> |
---|