[116] | 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 Supplier</title> |
---|
[374] | 8 | <nav:resources override="true"/> |
---|
[116] | 9 | </head> |
---|
| 10 | <body> |
---|
| 11 | <div class="nav"> |
---|
[374] | 12 | <nav:renderSubItems group="navAlt"/> |
---|
[116] | 13 | </div> |
---|
| 14 | <div class="body"> |
---|
| 15 | <g:if test="${flash.message}"> |
---|
| 16 | <div class="message">${flash.message}</div> |
---|
| 17 | </g:if> |
---|
| 18 | <g:hasErrors bean="${supplierInstance}"> |
---|
| 19 | <div class="errors"> |
---|
| 20 | <g:renderErrors bean="${supplierInstance}" as="list" /> |
---|
| 21 | </div> |
---|
| 22 | </g:hasErrors> |
---|
| 23 | <g:form method="post" > |
---|
| 24 | <input type="hidden" name="id" value="${supplierInstance?.id}" /> |
---|
| 25 | <input type="hidden" name="version" value="${supplierInstance?.version}" /> |
---|
| 26 | <div class="dialog"> |
---|
| 27 | <table> |
---|
| 28 | <tbody> |
---|
| 29 | |
---|
| 30 | <tr class="prop"> |
---|
| 31 | <td valign="top" class="name"> |
---|
[374] | 32 | <label for="name">Name:</label> |
---|
[116] | 33 | </td> |
---|
[374] | 34 | <td valign="top" class="value ${hasErrors(bean:supplierInstance,field:'name','errors')}"> |
---|
| 35 | <input type="text" id="name" name="name" value="${fieldValue(bean:supplierInstance,field:'name')}"/> |
---|
[116] | 36 | </td> |
---|
| 37 | </tr> |
---|
| 38 | |
---|
| 39 | <tr class="prop"> |
---|
| 40 | <td valign="top" class="name"> |
---|
[374] | 41 | <label for="description">Description:</label> |
---|
[116] | 42 | </td> |
---|
[374] | 43 | <td valign="top" class="value ${hasErrors(bean:supplierInstance,field:'description','errors')}"> |
---|
| 44 | <input type="text" id="description" name="description" value="${fieldValue(bean:supplierInstance,field:'description')}"/> |
---|
[116] | 45 | </td> |
---|
| 46 | </tr> |
---|
| 47 | |
---|
| 48 | <tr class="prop"> |
---|
| 49 | <td valign="top" class="name"> |
---|
| 50 | <label for="isActive">Is Active:</label> |
---|
| 51 | </td> |
---|
| 52 | <td valign="top" class="value ${hasErrors(bean:supplierInstance,field:'isActive','errors')}"> |
---|
| 53 | <g:checkBox name="isActive" value="${supplierInstance?.isActive}" ></g:checkBox> |
---|
| 54 | </td> |
---|
| 55 | </tr> |
---|
| 56 | |
---|
| 57 | <tr class="prop"> |
---|
| 58 | <td valign="top" class="name"> |
---|
| 59 | <label for="supplierType">Supplier Type:</label> |
---|
| 60 | </td> |
---|
| 61 | <td valign="top" class="value ${hasErrors(bean:supplierInstance,field:'supplierType','errors')}"> |
---|
| 62 | <g:select optionKey="id" from="${SupplierType.list()}" name="supplierType.id" value="${supplierInstance?.supplierType?.id}" ></g:select> |
---|
| 63 | </td> |
---|
| 64 | </tr> |
---|
[397] | 65 | |
---|
[374] | 66 | <tr class="prop"> |
---|
[397] | 67 | <td valign="top" class="name"> |
---|
[402] | 68 | <label for="addresses">Contact:</label> |
---|
| 69 | </td> |
---|
| 70 | <td valign="top" class="value"> |
---|
| 71 | <ul> |
---|
| 72 | <g:each var="i" in="${supplierInstance?.contacts}"> |
---|
| 73 | <li><g:link controller="contactDetailed" action="show" id="${i.id}"> |
---|
| 74 | ${i?.encodeAsHTML()} |
---|
| 75 | </g:link></li> |
---|
| 76 | </g:each> |
---|
| 77 | </ul> |
---|
| 78 | <g:link controller="contactDetailed" params="['supplier.id':supplierInstance?.id]" action="create">+Add Contact</g:link> |
---|
| 79 | </td> |
---|
| 80 | </tr> |
---|
| 81 | |
---|
| 82 | <tr class="prop"> |
---|
| 83 | <td valign="top" class="name"> |
---|
[397] | 84 | <label for="addresses">Addresses:</label> |
---|
| 85 | </td> |
---|
| 86 | <td valign="top" class="value"> |
---|
| 87 | <ul> |
---|
| 88 | <g:each var="i" in="${supplierInstance?.addresses?}"> |
---|
| 89 | <li><g:link controller="supplierDetailed" action="show" id="${i.id}"> |
---|
| 90 | ${i?.encodeAsHTML()} |
---|
| 91 | </g:link></li> |
---|
| 92 | </g:each> |
---|
| 93 | </ul> |
---|
[402] | 94 | <g:link controller="addressDetailed" params="['supplier.id':supplierInstance?.id]" action="create">+Add Address</g:link> |
---|
[397] | 95 | </td> |
---|
| 96 | </tr> |
---|
| 97 | |
---|
| 98 | <tr class="prop"> |
---|
[374] | 99 | <td valign="top" class="name">Inventory Items:</td> |
---|
| 100 | |
---|
| 101 | <td valign="top" style="text-align:left;" class="value"> |
---|
| 102 | <ul> |
---|
| 103 | <g:each var="i" in="${supplierInstance.inventoryItems}"> |
---|
| 104 | <li><g:link controller="inventoryItemDetailed" action="show" id="${i.id}">${i?.encodeAsHTML()}</g:link></li> |
---|
| 105 | </g:each> |
---|
| 106 | </ul> |
---|
| 107 | </td> |
---|
| 108 | |
---|
| 109 | </tr> |
---|
[116] | 110 | |
---|
| 111 | </tbody> |
---|
| 112 | </table> |
---|
| 113 | </div> |
---|
| 114 | <div class="buttons"> |
---|
| 115 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
[374] | 116 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
[116] | 117 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 118 | </div> |
---|
| 119 | </g:form> |
---|
| 120 | </div> |
---|
| 121 | </body> |
---|
| 122 | </html> |
---|