| 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 CostCode</title> | 
|---|
| 8 | <nav:resources override="true"/> | 
|---|
| 9 | </head> | 
|---|
| 10 | <body> | 
|---|
| 11 | <div class="nav"> | 
|---|
| 12 | <nav:renderSubItems group="navAlt"/> | 
|---|
| 13 | </div> | 
|---|
| 14 | <div class="body"> | 
|---|
| 15 | <g:render template="/shared/messages" /> | 
|---|
| 16 | <g:hasErrors bean="${costCodeInstance}"> | 
|---|
| 17 | <div class="errors"> | 
|---|
| 18 | <g:renderErrors bean="${costCodeInstance}" as="list" /> | 
|---|
| 19 | </div> | 
|---|
| 20 | </g:hasErrors> | 
|---|
| 21 | <g:form method="post" > | 
|---|
| 22 | <input type="hidden" name="id" value="${costCodeInstance?.id}" /> | 
|---|
| 23 | <input type="hidden" name="version" value="${costCodeInstance?.version}" /> | 
|---|
| 24 | <div class="dialog"> | 
|---|
| 25 | <table> | 
|---|
| 26 | <tbody> | 
|---|
| 27 |  | 
|---|
| 28 | <tr class="prop"> | 
|---|
| 29 | <td valign="top" class="name"> | 
|---|
| 30 | <label for="name">Name:</label> | 
|---|
| 31 | </td> | 
|---|
| 32 | <td valign="top" class="value ${hasErrors(bean:costCodeInstance,field:'name','errors')}"> | 
|---|
| 33 | <input type="text" maxlength="50" id="name" name="name" value="${fieldValue(bean:costCodeInstance,field:'name')}"/> | 
|---|
| 34 | </td> | 
|---|
| 35 | </tr> | 
|---|
| 36 |  | 
|---|
| 37 | <tr class="prop"> | 
|---|
| 38 | <td valign="top" class="name"> | 
|---|
| 39 | <label for="purchasingGroup">Purchasing Group:</label> | 
|---|
| 40 | </td> | 
|---|
| 41 | <td valign="top" class="value ${hasErrors(bean:costCodeInstance,field:'purchasingGroup','errors')}"> | 
|---|
| 42 | <g:select optionKey="id" | 
|---|
| 43 | from="${PurchasingGroup.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" | 
|---|
| 44 | name="purchasingGroup.id" | 
|---|
| 45 | value="${costCodeInstance?.purchasingGroup?.id}" > | 
|---|
| 46 | </g:select> | 
|---|
| 47 | <p> | 
|---|
| 48 | <g:link controller="purchasingGroupDetailed" action="create">+Add Group</g:link> | 
|---|
| 49 | </p> | 
|---|
| 50 | </td> | 
|---|
| 51 | </tr> | 
|---|
| 52 |  | 
|---|
| 53 | <tr class="prop"> | 
|---|
| 54 | <td valign="top" class="name"> | 
|---|
| 55 | <label for="description">Description:</label> | 
|---|
| 56 | </td> | 
|---|
| 57 | <td valign="top" class="value ${hasErrors(bean:costCodeInstance,field:'description','errors')}"> | 
|---|
| 58 | <input type="text" maxlength="100" id="description" name="description" value="${fieldValue(bean:costCodeInstance,field:'description')}"/> | 
|---|
| 59 | </td> | 
|---|
| 60 | </tr> | 
|---|
| 61 |  | 
|---|
| 62 | <tr class="prop"> | 
|---|
| 63 | <td valign="top" class="name"> | 
|---|
| 64 | <label for="isActive">Is Active:</label> | 
|---|
| 65 | </td> | 
|---|
| 66 | <td valign="top" class="value ${hasErrors(bean:costCodeInstance,field:'isActive','errors')}"> | 
|---|
| 67 | <g:checkBox name="isActive" value="${costCodeInstance?.isActive}" ></g:checkBox> | 
|---|
| 68 | </td> | 
|---|
| 69 | </tr> | 
|---|
| 70 |  | 
|---|
| 71 | </tbody> | 
|---|
| 72 | </table> | 
|---|
| 73 | </div> | 
|---|
| 74 | <div class="buttons"> | 
|---|
| 75 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> | 
|---|
| 76 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> | 
|---|
| 77 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> | 
|---|
| 78 | </div> | 
|---|
| 79 | </g:form> | 
|---|
| 80 | </div> | 
|---|
| 81 | </body> | 
|---|
| 82 | </html> | 
|---|