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 Contact</title> |
---|
8 | </head> |
---|
9 | <body> |
---|
10 | <div class="nav"> |
---|
11 | <h1>Create 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 action="save" method="post" > |
---|
21 | <div class="dialog"> |
---|
22 | <table> |
---|
23 | <tbody> |
---|
24 | |
---|
25 | <g:if test="${contactInstance.manufacturer}"> |
---|
26 | <g:hiddenField name="manufacturer.id" value="${contactInstance.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="${contactInstance.manufacturer.id}"> |
---|
33 | ${contactInstance.manufacturer.encodeAsHTML()} |
---|
34 | </g:link> |
---|
35 | </td> |
---|
36 | </tr> |
---|
37 | </g:if> |
---|
38 | |
---|
39 | <g:if test="${contactInstance.supplier}"> |
---|
40 | <g:hiddenField name="supplier.id" value="${contactInstance.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:contactInstance,field:'supplier','errors')}"> |
---|
46 | <g:link controller="supplierDetailed" action="show" id="${contactInstance.supplier.id}"> |
---|
47 | ${contactInstance.supplier.encodeAsHTML()} |
---|
48 | </g:link> |
---|
49 | </td> |
---|
50 | </tr> |
---|
51 | </g:if> |
---|
52 | |
---|
53 | <g:if test="${contactInstance.person}"> |
---|
54 | <g:hiddenField name="person.id" value="${contactInstance.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="${contactInstance.person.id}"> |
---|
61 | ${contactInstance.person.encodeAsHTML()} |
---|
62 | </g:link> |
---|
63 | </td> |
---|
64 | </tr> |
---|
65 | </g:if> |
---|
66 | |
---|
67 | <g:if test="${contactInstance.site}"> |
---|
68 | <g:hiddenField name="site.id" value="${contactInstance.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="${contactInstance.site.id}"> |
---|
75 | ${contactInstance.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="contactType">Contact Type:</label> |
---|
84 | </td> |
---|
85 | <td valign="top" class="value ${hasErrors(bean:contactInstance,field:'contactType','errors')}"> |
---|
86 | <g:select optionKey="id" from="${ContactType.list()}" name="contactType.id" value="${contactInstance?.contactType?.id}" ></g:select> |
---|
87 | </td> |
---|
88 | </tr> |
---|
89 | |
---|
90 | <tr class="prop"> |
---|
91 | <td valign="top" class="name"> |
---|
92 | <label for="email">Value:</label> |
---|
93 | </td> |
---|
94 | <td valign="top" class="value ${hasErrors(bean:contactInstance,field:'value','errors')}"> |
---|
95 | <input type="text" id="value" name="value" value="${fieldValue(bean:contactInstance,field:'value')}"/> |
---|
96 | </td> |
---|
97 | </tr> |
---|
98 | |
---|
99 | </tbody> |
---|
100 | </table> |
---|
101 | </div> |
---|
102 | <div class="buttons"> |
---|
103 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
104 | </div> |
---|
105 | </g:form> |
---|
106 | </div> |
---|
107 | </body> |
---|
108 | </html> |
---|