[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"> |
---|
[633] | 107 | <td valign="top" class="name"> |
---|
| 108 | <label for="purchasingGroups">Purchasing Groups:</label> |
---|
| 109 | </td> |
---|
| 110 | <td valign="top" class="value ${hasErrors(bean:person,field:'purchasingGroups','errors')}"> |
---|
| 111 | <g:helpBalloon class="helpballoon" code="person.purchasingGroups" /> |
---|
| 112 | <custom:checkBoxList name="purchasingGroups" |
---|
| 113 | from="${PurchasingGroup.findAllByIsActive(true)}" |
---|
| 114 | value="${person?.purchasingGroups?.collect{it.id}}" |
---|
| 115 | optionKey="id" |
---|
| 116 | sortBy="name" |
---|
| 117 | linkController="purchasingGroupDetailed" |
---|
| 118 | linkAction="show"/> |
---|
| 119 | <g:link controller="purchasingGroupDetailed" action="create">+Add Group</g:link> |
---|
| 120 | </td> |
---|
| 121 | </tr> |
---|
| 122 | |
---|
| 123 | <tr class="prop"> |
---|
[166] | 124 | <td valign="top" class="name" align="left"> |
---|
| 125 | Authorities: |
---|
| 126 | </td> |
---|
| 127 | <td valign="top" class="name" align="left"> |
---|
| 128 | <g:helpBalloon class="helpballoon" code="person.authorities" /> |
---|
| 129 | </td> |
---|
[150] | 130 | </tr> |
---|
[59] | 131 | |
---|
[150] | 132 | <g:each in="${authorityList}"> |
---|
| 133 | <tr> |
---|
[295] | 134 | <td valign="top" class="name" align="left">${it.description.encodeAsHTML()}</td> |
---|
[166] | 135 | <td align="left"> |
---|
| 136 | <g:checkBox name="${it.authority}" value="${it.authority == 'ROLE_AppUser'}"/> |
---|
| 137 | </td> |
---|
[150] | 138 | </tr> |
---|
| 139 | </g:each> |
---|
[59] | 140 | |
---|
[150] | 141 | </tbody> |
---|
| 142 | </table> |
---|
| 143 | </div> |
---|
[59] | 144 | |
---|
[150] | 145 | <div class="buttons"> |
---|
| 146 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
| 147 | </div> |
---|
[59] | 148 | |
---|
[150] | 149 | </g:form> |
---|
[59] | 150 | |
---|
[150] | 151 | </div> |
---|
[59] | 152 | </body> |
---|