1 | |
---|
2 | |
---|
3 | <html> |
---|
4 | <head> |
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
---|
6 | <meta name="layout" content="main" /> |
---|
7 | <title>Create Person</title> |
---|
8 | </head> |
---|
9 | <body> |
---|
10 | <div class="nav"> |
---|
11 | <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span> |
---|
12 | <span class="menuButton"><g:link class="list" action="list">Person List</g:link></span> |
---|
13 | </div> |
---|
14 | <div class="body"> |
---|
15 | <h1>Create Person</h1> |
---|
16 | <g:if test="${flash.message}"> |
---|
17 | <div class="message">${flash.message}</div> |
---|
18 | </g:if> |
---|
19 | <g:hasErrors bean="${personInstance}"> |
---|
20 | <div class="errors"> |
---|
21 | <g:renderErrors bean="${personInstance}" as="list" /> |
---|
22 | </div> |
---|
23 | </g:hasErrors> |
---|
24 | <g:form action="save" method="post" > |
---|
25 | <div class="dialog"> |
---|
26 | <table> |
---|
27 | <tbody> |
---|
28 | |
---|
29 | <tr class="prop"> |
---|
30 | <td valign="top" class="name"> |
---|
31 | <label for="firstName">First Name:</label> |
---|
32 | </td> |
---|
33 | <td valign="top" class="value ${hasErrors(bean:personInstance,field:'firstName','errors')}"> |
---|
34 | <input type="text" id="firstName" name="firstName" value="${fieldValue(bean:personInstance,field:'firstName')}"/> |
---|
35 | </td> |
---|
36 | </tr> |
---|
37 | |
---|
38 | <tr class="prop"> |
---|
39 | <td valign="top" class="name"> |
---|
40 | <label for="lastName">Last Name:</label> |
---|
41 | </td> |
---|
42 | <td valign="top" class="value ${hasErrors(bean:personInstance,field:'lastName','errors')}"> |
---|
43 | <input type="text" id="lastName" name="lastName" value="${fieldValue(bean:personInstance,field:'lastName')}"/> |
---|
44 | </td> |
---|
45 | </tr> |
---|
46 | |
---|
47 | <tr class="prop"> |
---|
48 | <td valign="top" class="name"> |
---|
49 | <label for="employeeID">Employee ID:</label> |
---|
50 | </td> |
---|
51 | <td valign="top" class="value ${hasErrors(bean:personInstance,field:'employeeID','errors')}"> |
---|
52 | <input type="text" id="employeeID" name="employeeID" value="${fieldValue(bean:personInstance,field:'employeeID')}" /> |
---|
53 | </td> |
---|
54 | </tr> |
---|
55 | |
---|
56 | <tr class="prop"> |
---|
57 | <td valign="top" class="name"> |
---|
58 | <label for="isActive">Is Active:</label> |
---|
59 | </td> |
---|
60 | <td valign="top" class="value ${hasErrors(bean:personInstance,field:'isActive','errors')}"> |
---|
61 | <g:checkBox name="isActive" value="${personInstance?.isActive}" ></g:checkBox> |
---|
62 | </td> |
---|
63 | </tr> |
---|
64 | |
---|
65 | <tr class="prop"> |
---|
66 | <td valign="top" class="name"> |
---|
67 | <label for="personGroup">Person Group:</label> |
---|
68 | </td> |
---|
69 | <td valign="top" class="value ${hasErrors(bean:personInstance,field:'personGroup','errors')}"> |
---|
70 | <g:select optionKey="id" from="${PersonGroup.list()}" name="personGroup.id" value="${personInstance?.personGroup?.id}" ></g:select> |
---|
71 | </td> |
---|
72 | </tr> |
---|
73 | |
---|
74 | </tbody> |
---|
75 | </table> |
---|
76 | </div> |
---|
77 | <div class="buttons"> |
---|
78 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
79 | </div> |
---|
80 | </g:form> |
---|
81 | </div> |
---|
82 | </body> |
---|
83 | </html> |
---|