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