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