[402] | 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.supplier}"> |
---|
| 26 | <g:hiddenField name="supplier.id" value="${contactInstance.supplier.id}"/> |
---|
| 27 | <tr class="prop"> |
---|
| 28 | <td valign="top" class="name"> |
---|
| 29 | <label for="supplier">Supplier:</label> |
---|
| 30 | </td> |
---|
| 31 | <td valign="top" class="value ${hasErrors(bean:contactInstance,field:'supplier','errors')}"> |
---|
| 32 | <g:link controller="supplierDetailed" action="show" id="${contactInstance.supplier.id}"> |
---|
| 33 | ${contactInstance.supplier.encodeAsHTML()} |
---|
| 34 | </g:link> |
---|
| 35 | </td> |
---|
| 36 | </tr> |
---|
| 37 | </g:if> |
---|
| 38 | |
---|
| 39 | <g:if test="${contactInstance.person}"> |
---|
| 40 | <g:hiddenField name="person.id" value="${contactInstance.person.id}"/> |
---|
| 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="${contactInstance.person.id}"> |
---|
| 47 | ${contactInstance.person.encodeAsHTML()} |
---|
| 48 | </g:link> |
---|
| 49 | </td> |
---|
| 50 | </tr> |
---|
| 51 | </g:if> |
---|
| 52 | |
---|
| 53 | <g:if test="${contactInstance.site}"> |
---|
| 54 | <g:hiddenField name="site.id" value="${contactInstance.site.id}"/> |
---|
| 55 | <tr class="prop"> |
---|
| 56 | <td valign="top" class="name"> |
---|
| 57 | <label for="site">Site:</label> |
---|
| 58 | </td> |
---|
| 59 | <td valign="top" class="value"> |
---|
| 60 | <g:link controller="siteDetailed" action="show" id="${contactInstance.site.id}"> |
---|
| 61 | ${contactInstance.site.encodeAsHTML()} |
---|
| 62 | </g:link> |
---|
| 63 | </td> |
---|
| 64 | </tr> |
---|
| 65 | </g:if> |
---|
| 66 | |
---|
| 67 | <tr class="prop"> |
---|
| 68 | <td valign="top" class="name"> |
---|
| 69 | <label for="contactType">Contact Type:</label> |
---|
| 70 | </td> |
---|
| 71 | <td valign="top" class="value ${hasErrors(bean:contactInstance,field:'contactType','errors')}"> |
---|
| 72 | <g:select optionKey="id" from="${ContactType.list()}" name="contactType.id" value="${contactInstance?.contactType?.id}" ></g:select> |
---|
| 73 | </td> |
---|
| 74 | </tr> |
---|
| 75 | |
---|
| 76 | <tr class="prop"> |
---|
| 77 | <td valign="top" class="name"> |
---|
| 78 | <label for="email">Value:</label> |
---|
| 79 | </td> |
---|
| 80 | <td valign="top" class="value ${hasErrors(bean:contactInstance,field:'value','errors')}"> |
---|
| 81 | <input type="text" id="value" name="value" value="${fieldValue(bean:contactInstance,field:'value')}"/> |
---|
| 82 | </td> |
---|
| 83 | </tr> |
---|
| 84 | |
---|
| 85 | </tbody> |
---|
| 86 | </table> |
---|
| 87 | </div> |
---|
| 88 | <div class="buttons"> |
---|
| 89 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
| 90 | </div> |
---|
| 91 | </g:form> |
---|
| 92 | </div> |
---|
| 93 | </body> |
---|
| 94 | </html> |
---|