[397] | 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 Address</title> |
---|
| 8 | </head> |
---|
| 9 | <body> |
---|
| 10 | <div class="nav"> |
---|
| 11 | <h1>Create Address</h1> |
---|
| 12 | </div> |
---|
| 13 | <div class="body"> |
---|
[404] | 14 | <g:render template="/shared/messages" /> |
---|
[397] | 15 | <g:hasErrors bean="${addressInstance}"> |
---|
| 16 | <div class="errors"> |
---|
| 17 | <g:renderErrors bean="${addressInstance}" as="list" /> |
---|
| 18 | </div> |
---|
| 19 | </g:hasErrors> |
---|
| 20 | <g:form action="save" method="post" > |
---|
| 21 | <div class="dialog"> |
---|
| 22 | <table> |
---|
| 23 | <tbody> |
---|
| 24 | |
---|
| 25 | <g:if test="${addressInstance.manufacturer}"> |
---|
| 26 | <g:hiddenField name="manufacturer.id" value="${addressInstance.manufacturer.id}"/> |
---|
| 27 | <tr class="prop"> |
---|
| 28 | <td valign="top" class="name"> |
---|
| 29 | <label for="manufacturer">Manufacturer:</label> |
---|
| 30 | </td> |
---|
| 31 | <td valign="top" class="value"> |
---|
| 32 | <g:link controller="manufacturerDetailed" action="show" id="${addressInstance.manufacturer.id}"> |
---|
| 33 | ${addressInstance.manufacturer.encodeAsHTML()} |
---|
| 34 | </g:link> |
---|
| 35 | </td> |
---|
| 36 | </tr> |
---|
| 37 | </g:if> |
---|
| 38 | |
---|
| 39 | <g:if test="${addressInstance.supplier}"> |
---|
| 40 | <g:hiddenField name="supplier.id" value="${addressInstance.supplier.id}"/> |
---|
| 41 | <tr class="prop"> |
---|
| 42 | <td valign="top" class="name"> |
---|
| 43 | <label for="supplier">Supplier:</label> |
---|
| 44 | </td> |
---|
| 45 | <td valign="top" class="value ${hasErrors(bean:addressInstance,field:'supplier','errors')}"> |
---|
| 46 | <g:link controller="supplierDetailed" action="show" id="${addressInstance.supplier.id}"> |
---|
| 47 | ${addressInstance.supplier.encodeAsHTML()} |
---|
| 48 | </g:link> |
---|
| 49 | </td> |
---|
| 50 | </tr> |
---|
| 51 | </g:if> |
---|
| 52 | |
---|
| 53 | <g:if test="${addressInstance.person}"> |
---|
| 54 | <g:hiddenField name="person.id" value="${addressInstance.person.id}"/> |
---|
| 55 | <tr class="prop"> |
---|
| 56 | <td valign="top" class="name"> |
---|
| 57 | <label for="person">Person:</label> |
---|
| 58 | </td> |
---|
| 59 | <td valign="top" class="value"> |
---|
| 60 | <g:link controller="person" action="show" id="${addressInstance.person.id}"> |
---|
| 61 | ${addressInstance.person.encodeAsHTML()} |
---|
| 62 | </g:link> |
---|
| 63 | </td> |
---|
| 64 | </tr> |
---|
| 65 | </g:if> |
---|
| 66 | |
---|
| 67 | <g:if test="${addressInstance.site}"> |
---|
| 68 | <g:hiddenField name="site.id" value="${addressInstance.site.id}"/> |
---|
| 69 | <tr class="prop"> |
---|
| 70 | <td valign="top" class="name"> |
---|
| 71 | <label for="site">Site:</label> |
---|
| 72 | </td> |
---|
| 73 | <td valign="top" class="value"> |
---|
| 74 | <g:link controller="siteDetailed" action="show" id="${addressInstance.site.id}"> |
---|
| 75 | ${addressInstance.site.encodeAsHTML()} |
---|
| 76 | </g:link> |
---|
| 77 | </td> |
---|
| 78 | </tr> |
---|
| 79 | </g:if> |
---|
| 80 | |
---|
| 81 | <tr class="prop"> |
---|
| 82 | <td valign="top" class="name"> |
---|
| 83 | <label for="addressType">Address Type:</label> |
---|
| 84 | </td> |
---|
| 85 | <td valign="top" class="value ${hasErrors(bean:addressInstance,field:'addressType','errors')}"> |
---|
| 86 | <g:select optionKey="id" from="${AddressType.list()}" name="addressType.id" value="${addressInstance?.addressType?.id}" ></g:select> |
---|
| 87 | </td> |
---|
| 88 | </tr> |
---|
| 89 | |
---|
| 90 | <tr class="prop"> |
---|
| 91 | <td valign="top" class="name"> |
---|
| 92 | <label for="street1">Street 1:</label> |
---|
| 93 | </td> |
---|
| 94 | <td valign="top" class="value ${hasErrors(bean:addressInstance,field:'street1','errors')}"> |
---|
| 95 | <input type="text" maxlength="50" id="street1" name="street1" value="${fieldValue(bean:addressInstance,field:'street1')}"/> |
---|
| 96 | </td> |
---|
| 97 | </tr> |
---|
| 98 | |
---|
| 99 | <tr class="prop"> |
---|
| 100 | <td valign="top" class="name"> |
---|
| 101 | <label for="street2">Street 2:</label> |
---|
| 102 | </td> |
---|
| 103 | <td valign="top" class="value ${hasErrors(bean:addressInstance,field:'street2','errors')}"> |
---|
| 104 | <input type="text" maxlength="50" id="street2" name="street2" value="${fieldValue(bean:addressInstance,field:'street2')}"/> |
---|
| 105 | </td> |
---|
| 106 | </tr> |
---|
| 107 | |
---|
| 108 | <tr class="prop"> |
---|
| 109 | <td valign="top" class="name"> |
---|
| 110 | <label for="city">City:</label> |
---|
| 111 | </td> |
---|
| 112 | <td valign="top" class="value ${hasErrors(bean:addressInstance,field:'city','errors')}"> |
---|
| 113 | <input type="text" maxlength="50" id="city" name="city" value="${fieldValue(bean:addressInstance,field:'city')}"/> |
---|
| 114 | </td> |
---|
| 115 | </tr> |
---|
| 116 | |
---|
| 117 | <tr class="prop"> |
---|
| 118 | <td valign="top" class="name"> |
---|
| 119 | <label for="state">State:</label> |
---|
| 120 | </td> |
---|
| 121 | <td valign="top" class="value ${hasErrors(bean:addressInstance,field:'state','errors')}"> |
---|
| 122 | <input type="text" maxlength="50" id="state" name="state" value="${fieldValue(bean:addressInstance,field:'state')}"/> |
---|
| 123 | </td> |
---|
| 124 | </tr> |
---|
| 125 | |
---|
| 126 | <tr class="prop"> |
---|
| 127 | <td valign="top" class="name"> |
---|
| 128 | <label for="postCode">Post Code:</label> |
---|
| 129 | </td> |
---|
| 130 | <td valign="top" class="value ${hasErrors(bean:addressInstance,field:'postCode','errors')}"> |
---|
| 131 | <input type="text" maxlength="50" id="postCode" name="postCode" value="${fieldValue(bean:addressInstance,field:'postCode')}"/> |
---|
| 132 | </td> |
---|
| 133 | </tr> |
---|
| 134 | |
---|
| 135 | <tr class="prop"> |
---|
| 136 | <td valign="top" class="name"> |
---|
| 137 | <label for="country">Country:</label> |
---|
| 138 | </td> |
---|
| 139 | <td valign="top" class="value ${hasErrors(bean:addressInstance,field:'country','errors')}"> |
---|
| 140 | <input type="text" maxlength="50" id="country" name="country" value="${fieldValue(bean:addressInstance,field:'country')}"/> |
---|
| 141 | </td> |
---|
| 142 | </tr> |
---|
| 143 | |
---|
| 144 | </tbody> |
---|
| 145 | </table> |
---|
| 146 | </div> |
---|
| 147 | <div class="buttons"> |
---|
| 148 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
| 149 | </div> |
---|
| 150 | </g:form> |
---|
| 151 | </div> |
---|
| 152 | </body> |
---|
| 153 | </html> |
---|