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>Edit Department</title> |
---|
8 | </head> |
---|
9 | <body> |
---|
10 | <div class="nav"> |
---|
11 | <span class="menuButton"><a class="home" href="${resource(dir:'')}">Home</a></span> |
---|
12 | <span class="menuButton"><g:link class="list" action="list">Department List</g:link></span> |
---|
13 | <span class="menuButton"><g:link class="create" action="create">New Department</g:link></span> |
---|
14 | </div> |
---|
15 | <div class="body"> |
---|
16 | <h1>Edit Department</h1> |
---|
17 | <g:if test="${flash.message}"> |
---|
18 | <div class="message">${flash.message}</div> |
---|
19 | </g:if> |
---|
20 | <g:hasErrors bean="${departmentInstance}"> |
---|
21 | <div class="errors"> |
---|
22 | <g:renderErrors bean="${departmentInstance}" as="list" /> |
---|
23 | </div> |
---|
24 | </g:hasErrors> |
---|
25 | <g:form method="post" > |
---|
26 | <input type="hidden" name="id" value="${departmentInstance?.id}" /> |
---|
27 | <input type="hidden" name="version" value="${departmentInstance?.version}" /> |
---|
28 | <div class="dialog"> |
---|
29 | <table> |
---|
30 | <tbody> |
---|
31 | |
---|
32 | <tr class="prop"> |
---|
33 | <td valign="top" class="name"> |
---|
34 | <label for="name">Name:</label> |
---|
35 | </td> |
---|
36 | <td valign="top" class="value ${hasErrors(bean:departmentInstance,field:'name','errors')}"> |
---|
37 | <input type="text" id="name" name="name" value="${fieldValue(bean:departmentInstance,field:'name')}"/> |
---|
38 | </td> |
---|
39 | </tr> |
---|
40 | |
---|
41 | <tr class="prop"> |
---|
42 | <td valign="top" class="name"> |
---|
43 | <label for="description">Description:</label> |
---|
44 | </td> |
---|
45 | <td valign="top" class="value ${hasErrors(bean:departmentInstance,field:'description','errors')}"> |
---|
46 | <input type="text" id="description" name="description" value="${fieldValue(bean:departmentInstance,field:'description')}"/> |
---|
47 | </td> |
---|
48 | </tr> |
---|
49 | |
---|
50 | <tr class="prop"> |
---|
51 | <td valign="top" class="name"> |
---|
52 | <label for="costCode">Cost Code:</label> |
---|
53 | </td> |
---|
54 | <td valign="top" class="value ${hasErrors(bean:departmentInstance,field:'costCode','errors')}"> |
---|
55 | <input type="text" id="costCode" name="costCode" value="${fieldValue(bean:departmentInstance,field:'costCode')}"/> |
---|
56 | </td> |
---|
57 | </tr> |
---|
58 | |
---|
59 | <tr class="prop"> |
---|
60 | <td valign="top" class="name"> |
---|
61 | <label for="isActive">Is Active:</label> |
---|
62 | </td> |
---|
63 | <td valign="top" class="value ${hasErrors(bean:departmentInstance,field:'isActive','errors')}"> |
---|
64 | <g:checkBox name="isActive" value="${departmentInstance?.isActive}" ></g:checkBox> |
---|
65 | </td> |
---|
66 | </tr> |
---|
67 | |
---|
68 | <tr class="prop"> |
---|
69 | <td valign="top" class="name"> |
---|
70 | <label for="persons">Persons:</label> |
---|
71 | </td> |
---|
72 | <td valign="top" class="value ${hasErrors(bean:departmentInstance,field:'persons','errors')}"> |
---|
73 | |
---|
74 | <ul> |
---|
75 | <g:each var="p" in="${departmentInstance?.persons?}"> |
---|
76 | <li><g:link controller="person" action="show" id="${p.id}">${p?.encodeAsHTML()}</g:link></li> |
---|
77 | </g:each> |
---|
78 | </ul> |
---|
79 | <g:link controller="person" params="['department.id':departmentInstance?.id]" action="create">Add Person</g:link> |
---|
80 | |
---|
81 | </td> |
---|
82 | </tr> |
---|
83 | |
---|
84 | <tr class="prop"> |
---|
85 | <td valign="top" class="name"> |
---|
86 | <label for="systemSections">System Sections:</label> |
---|
87 | </td> |
---|
88 | <td valign="top" class="value ${hasErrors(bean:departmentInstance,field:'systemSections','errors')}"> |
---|
89 | |
---|
90 | <ul> |
---|
91 | <g:each var="s" in="${departmentInstance?.systemSections?}"> |
---|
92 | <li><g:link controller="systemSection" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
93 | </g:each> |
---|
94 | </ul> |
---|
95 | <g:link controller="systemSection" params="['department.id':departmentInstance?.id]" action="create">Add SystemSection</g:link> |
---|
96 | |
---|
97 | </td> |
---|
98 | </tr> |
---|
99 | |
---|
100 | </tbody> |
---|
101 | </table> |
---|
102 | </div> |
---|
103 | <div class="buttons"> |
---|
104 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
105 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
106 | </div> |
---|
107 | </g:form> |
---|
108 | </div> |
---|
109 | </body> |
---|
110 | </html> |
---|