

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Create TaskRecurringSchedule</title>         
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="list" action="list">TaskRecurringSchedule List</g:link></span>
        </div>
        <div class="body">
            <h1>Create TaskRecurringSchedule</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${taskRecurringScheduleInstance}">
            <div class="errors">
                <g:renderErrors bean="${taskRecurringScheduleInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form action="save" method="post" >
                <g:hiddenField name="task.id" value="${taskRecurringScheduleInstance.task.id}" />
                <div class="dialog">
                    <table>
                        <tbody>

                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="recForTask">Recurring Schedule for Task:</label>
                                </td>
								<td valign="top" name="recForTask" class="value">
									<g:link controller="taskDetailed" action="show" id="${taskRecurringScheduleInstance?.task?.id}">${taskRecurringScheduleInstance?.task?.encodeAsHTML()}</g:link>
								</td>
                            </tr>
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="startDate">Start Date:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'startDate','errors')}">
                                    <g:datePicker name="startDate" value="${taskRecurringScheduleInstance?.startDate}"  precision="day"></g:datePicker>
                                </td>
                            </tr>   
                      
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="recurEvery">Recur Every:</label>
                                </td>
                                <td valign="top" class="value" >
                                    <input type="text" class="time ${hasErrors(bean:taskRecurringScheduleInstance,field:'recurEvery','errors')}"
 										id="recurEvery" name="recurEvery" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'recurEvery')}" />
                                    <g:select optionKey="id" from="${Period.list()}" name="recurPeriod.id" value="${taskRecurringScheduleInstance?.recurPeriod?.id}" ></g:select>
                                </td>
                            </tr>   
                      
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="recurEvery">Task Duration:</label>
                                </td>
                                <td valign="top" class="value" >
                                    <input type="text" class="time ${hasErrors(bean:taskRecurringScheduleInstance,field:'taskDuration','errors')}"
                                        id="taskDuration" name="taskDuration" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'taskDuration')}" />
                                    <g:select optionKey="id" from="${Period.list()}" name="taskDurationPeriod.id" value="${taskRecurringScheduleInstance?.taskDurationPeriod?.id}" ></g:select>
                                </td>
                            </tr>   
                      
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="recurEvery">Generate Ahead:</label>
                                </td>
                                <td valign="top" class="value" >
                                    <input type="text" class="time ${hasErrors(bean:taskRecurringScheduleInstance,field:'generateAhead','errors')}"
                                        id="generateAhead" name="generateAhead" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'generateAhead')}" />
                                    <g:select optionKey="id" from="${Period.list()}" name="generateAheadPeriod.id" value="${taskRecurringScheduleInstance?.generateAheadPeriod?.id}" ></g:select>
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="isEnabled">Is Enabled:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'isEnabled','errors')}">
                                    <g:checkBox name="isEnabled" value="${taskRecurringScheduleInstance?.isEnabled}" ></g:checkBox>
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><input class="save" type="submit" value="Create" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
