[21] | 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 Task</title> |
---|
| 8 | </head> |
---|
| 9 | <body> |
---|
| 10 | <div class="nav"> |
---|
| 11 | <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span> |
---|
| 12 | <span class="menuButton"><g:link class="list" action="list">Task List</g:link></span> |
---|
| 13 | <span class="menuButton"><g:link class="create" action="create">New Task</g:link></span> |
---|
| 14 | </div> |
---|
| 15 | <div class="body"> |
---|
| 16 | <h1>Edit Task</h1> |
---|
| 17 | <g:if test="${flash.message}"> |
---|
| 18 | <div class="message">${flash.message}</div> |
---|
| 19 | </g:if> |
---|
| 20 | <g:hasErrors bean="${taskInstance}"> |
---|
| 21 | <div class="errors"> |
---|
| 22 | <g:renderErrors bean="${taskInstance}" as="list" /> |
---|
| 23 | </div> |
---|
| 24 | </g:hasErrors> |
---|
| 25 | <g:form method="post" > |
---|
| 26 | <input type="hidden" name="id" value="${taskInstance?.id}" /> |
---|
| 27 | <div class="dialog"> |
---|
| 28 | <table> |
---|
| 29 | <tbody> |
---|
| 30 | |
---|
| 31 | <tr class="prop"> |
---|
| 32 | <td valign="top" class="name"> |
---|
| 33 | <label for="name">Name:</label> |
---|
| 34 | </td> |
---|
| 35 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'name','errors')}"> |
---|
| 36 | <input type="text" id="name" name="name" value="${fieldValue(bean:taskInstance,field:'name')}"/> |
---|
| 37 | </td> |
---|
| 38 | </tr> |
---|
| 39 | |
---|
| 40 | <tr class="prop"> |
---|
| 41 | <td valign="top" class="name"> |
---|
| 42 | <label for="description">Description:</label> |
---|
| 43 | </td> |
---|
| 44 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'description','errors')}"> |
---|
| 45 | <input type="text" id="description" name="description" value="${fieldValue(bean:taskInstance,field:'description')}"/> |
---|
| 46 | </td> |
---|
| 47 | </tr> |
---|
| 48 | |
---|
| 49 | <tr class="prop"> |
---|
| 50 | <td valign="top" class="name"> |
---|
| 51 | <label for="entries">Entries:</label> |
---|
| 52 | </td> |
---|
| 53 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'entries','errors')}"> |
---|
| 54 | |
---|
| 55 | <ul> |
---|
| 56 | <g:each var="e" in="${taskInstance?.entries?}"> |
---|
| 57 | <li><g:link controller="entry" action="show" id="${e.id}">${e?.encodeAsHTML()}</g:link></li> |
---|
| 58 | </g:each> |
---|
| 59 | </ul> |
---|
| 60 | <g:link controller="entry" params="['task.id':taskInstance?.id]" action="create">Add Entry</g:link> |
---|
| 61 | |
---|
| 62 | </td> |
---|
| 63 | </tr> |
---|
| 64 | |
---|
| 65 | <tr class="prop"> |
---|
| 66 | <td valign="top" class="name"> |
---|
| 67 | <label for="modifications">Modifications:</label> |
---|
| 68 | </td> |
---|
| 69 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'modifications','errors')}"> |
---|
| 70 | |
---|
| 71 | <ul> |
---|
| 72 | <g:each var="m" in="${taskInstance?.modifications?}"> |
---|
| 73 | <li><g:link controller="modification" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
| 74 | </g:each> |
---|
| 75 | </ul> |
---|
| 76 | <g:link controller="modification" params="['task.id':taskInstance?.id]" action="create">Add Modification</g:link> |
---|
| 77 | |
---|
| 78 | </td> |
---|
| 79 | </tr> |
---|
| 80 | |
---|
| 81 | <tr class="prop"> |
---|
| 82 | <td valign="top" class="name"> |
---|
| 83 | <label for="person">Person:</label> |
---|
| 84 | </td> |
---|
| 85 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'person','errors')}"> |
---|
| 86 | <g:select optionKey="id" from="${Person.list()}" name="person.id" value="${taskInstance?.person?.id}" ></g:select> |
---|
| 87 | </td> |
---|
| 88 | </tr> |
---|
| 89 | |
---|
| 90 | <tr class="prop"> |
---|
| 91 | <td valign="top" class="name"> |
---|
| 92 | <label for="scheduledDate">Scheduled Date:</label> |
---|
| 93 | </td> |
---|
| 94 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'scheduledDate','errors')}"> |
---|
| 95 | <g:datePicker name="scheduledDate" value="${taskInstance?.scheduledDate}" ></g:datePicker> |
---|
| 96 | </td> |
---|
| 97 | </tr> |
---|
| 98 | |
---|
| 99 | <tr class="prop"> |
---|
| 100 | <td valign="top" class="name"> |
---|
| 101 | <label for="targetDate">Target Date:</label> |
---|
| 102 | </td> |
---|
| 103 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'targetDate','errors')}"> |
---|
| 104 | <g:datePicker name="targetDate" value="${taskInstance?.targetDate}" ></g:datePicker> |
---|
| 105 | </td> |
---|
| 106 | </tr> |
---|
| 107 | |
---|
| 108 | <tr class="prop"> |
---|
| 109 | <td valign="top" class="name"> |
---|
| 110 | <label for="taskGroup">Task Group:</label> |
---|
| 111 | </td> |
---|
| 112 | <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskGroup','errors')}"> |
---|
| 113 | <g:select optionKey="id" from="${TaskGroup.list()}" name="taskGroup.id" value="${taskInstance?.taskGroup?.id}" ></g:select> |
---|
| 114 | </td> |
---|
| 115 | </tr> |
---|
| 116 | |
---|
| 117 | </tbody> |
---|
| 118 | </table> |
---|
| 119 | </div> |
---|
| 120 | <div class="buttons"> |
---|
| 121 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
| 122 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 123 | </div> |
---|
| 124 | </g:form> |
---|
| 125 | </div> |
---|
| 126 | </body> |
---|
| 127 | </html> |
---|