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 Contact</title> |
---|
8 | </head> |
---|
9 | <body> |
---|
10 | <div class="nav"> |
---|
11 | <h1>Edit Contact</h1> |
---|
12 | </div> |
---|
13 | <div class="body"> |
---|
14 | <g:render template="/shared/messages" /> |
---|
15 | <g:hasErrors bean="${contactInstance}"> |
---|
16 | <div class="errors"> |
---|
17 | <g:renderErrors bean="${contactInstance}" as="list" /> |
---|
18 | </div> |
---|
19 | </g:hasErrors> |
---|
20 | <g:form method="post" > |
---|
21 | <input type="hidden" name="id" value="${contactInstance?.id}" /> |
---|
22 | <input type="hidden" name="version" value="${contactInstance?.version}" /> |
---|
23 | <div class="dialog"> |
---|
24 | <table> |
---|
25 | <tbody> |
---|
26 | |
---|
27 | <g:if test="${contactInstance.manufacturer}"> |
---|
28 | <g:hiddenField name="manufacturer.id" value="${contactInstance.manufacturer.id}"/> |
---|
29 | <tr class="prop"> |
---|
30 | <td valign="top" class="name"> |
---|
31 | <label for="manufacturer">Manufacturer:</label> |
---|
32 | </td> |
---|
33 | <td valign="top" class="value"> |
---|
34 | <g:link controller="manufacturerDetailed" action="show" id="${contactInstance.manufacturer.id}"> |
---|
35 | ${contactInstance.manufacturer.encodeAsHTML()} |
---|
36 | </g:link> |
---|
37 | </td> |
---|
38 | </tr> |
---|
39 | </g:if> |
---|
40 | |
---|
41 | <g:if test="${contactInstance.supplier}"> |
---|
42 | <g:hiddenField name="supplier.id" value="${contactInstance.supplier.id}"/> |
---|
43 | <tr class="prop"> |
---|
44 | <td valign="top" class="name"> |
---|
45 | <label for="supplier">Supplier:</label> |
---|
46 | </td> |
---|
47 | <td valign="top" class="value ${hasErrors(bean:contactInstance,field:'supplier','errors')}"> |
---|
48 | <g:link controller="supplierDetailed" action="show" id="${contactInstance.supplier.id}"> |
---|
49 | ${contactInstance.supplier.encodeAsHTML()} |
---|
50 | </g:link> |
---|
51 | </td> |
---|
52 | </tr> |
---|
53 | </g:if> |
---|
54 | |
---|
55 | <g:if test="${contactInstance.person}"> |
---|
56 | <g:hiddenField name="person.id" value="${contactInstance.person.id}"/> |
---|
57 | <tr class="prop"> |
---|
58 | <td valign="top" class="name"> |
---|
59 | <label for="person">Person:</label> |
---|
60 | </td> |
---|
61 | <td valign="top" class="value"> |
---|
62 | <g:link controller="person" action="show" id="${contactInstance.person.id}"> |
---|
63 | ${contactInstance.person.encodeAsHTML()} |
---|
64 | </g:link> |
---|
65 | </td> |
---|
66 | </tr> |
---|
67 | </g:if> |
---|
68 | |
---|
69 | <g:if test="${contactInstance.site}"> |
---|
70 | <g:hiddenField name="site.id" value="${contactInstance.site.id}"/> |
---|
71 | <tr class="prop"> |
---|
72 | <td valign="top" class="name"> |
---|
73 | <label for="site">Site:</label> |
---|
74 | </td> |
---|
75 | <td valign="top" class="value"> |
---|
76 | <g:link controller="siteDetailed" action="show" id="${contactInstance.site.id}"> |
---|
77 | ${contactInstance.site.encodeAsHTML()} |
---|
78 | </g:link> |
---|
79 | </td> |
---|
80 | </tr> |
---|
81 | </g:if> |
---|
82 | |
---|
83 | <tr class="prop"> |
---|
84 | <td valign="top" class="name"> |
---|
85 | <label for="contactType">Contact Type:</label> |
---|
86 | </td> |
---|
87 | <td valign="top" class="value ${hasErrors(bean:contactInstance,field:'contactType','errors')}"> |
---|
88 | <g:select optionKey="id" from="${ContactType.list()}" name="contactType.id" value="${contactInstance?.contactType?.id}" ></g:select> |
---|
89 | </td> |
---|
90 | </tr> |
---|
91 | |
---|
92 | <tr class="prop"> |
---|
93 | <td valign="top" class="name"> |
---|
94 | <label for="email">Value:</label> |
---|
95 | </td> |
---|
96 | <td valign="top" class="value ${hasErrors(bean:contactInstance,field:'value','errors')}"> |
---|
97 | <input type="text" id="value" name="value" value="${fieldValue(bean:contactInstance,field:'value')}"/> |
---|
98 | </td> |
---|
99 | </tr> |
---|
100 | |
---|
101 | </tbody> |
---|
102 | </table> |
---|
103 | </div> |
---|
104 | <div class="buttons"> |
---|
105 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
106 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
107 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
108 | </div> |
---|
109 | </g:form> |
---|
110 | </div> |
---|
111 | </body> |
---|
112 | </html> |
---|