<!--#set global $pane="Scheduling"#-->
<!--#set global $help_uri="configure-scheduling-0-7"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->

<%
import time
t = time.localtime()
hour = t[3]
if hour != 23:
  hour += 1
else:
  hour = 0
%>

<div class="colmask">
    <div class="section">
        <div class="col2">
            <h3>$T('addSchedule')</h3>
        </div><!-- /col2 -->
        <form action="addSchedule" method="post">
        <input type="hidden" id="session" name="session" value="$session" />
        <div class="col1">
            <fieldset>
                <div class="field-pair alt">
                    <label class="config" for="hour">$T('hour').capitalize() : $T('minute').capitalize()</label>
                    <select name="hour" id="hour">
                        <!--#for $i in range(24)#-->
                            <option value="$i" <!--#if hour == i then 'selected="selected"' else ""#--> > $str($i).zfill(2) </option>
                        <!--#end for#-->
                    </select>&nbsp;<b>:</b>&nbsp;<select name="minute" id="minute">
                        <!--#for $i in range(60)#-->
                            <option value="$i"> $str($i).zfill(2) </option>
                        <!--#end for#-->
                    </select>
                </div>
                <div class="field-pair">
                    <label class="config" for="daysofweek">$T('sch-frequency')</label>
                    <div class="checkbox-days">
                      <p><input type="checkbox" name="daysofweek" value="1"><label>$T('monday')</label></p>
                      <p><input type="checkbox" name="daysofweek" value="2"><label>$T('tuesday')</label></p>
                      <p><input type="checkbox" name="daysofweek" value="3"><label>$T('wednesday')</label></p>
                      <p><input type="checkbox" name="daysofweek" value="4"><label>$T('thursday')</label></p>
                      <p><input type="checkbox" name="daysofweek" value="5"><label>$T('friday')</label></p>
                      <p><input type="checkbox" name="daysofweek" value="6"><label>$T('saturday')</label></p>
                      <p><input type="checkbox" name="daysofweek" value="7"><label>$T('sunday')</label></p>
                    </div>
                </div>
                <div class="field-pair alt">
                    <label class="config" for="action">$T('sch-action')</label>
                    <select name="action" id="action">
                        <!--#for $action in $actions#-->
                            <option value="$action">$actions_lng[$action]</option>
                        <!--#end for#-->
                    </select>
                </div>
                <div class="field-pair">
                    <label class="config" for="arguments">$T('sch-arguments')</label>
                    <input type="text" name="arguments" id="arguments" value="" size="20" />
                </div>
                <div class="field-pair">
                    <input type="submit" value="$T('button-addSchedule')" />
                </div>
            </fieldset>
        </div><!-- /col1 -->
    </div><!-- /section -->
    </form>
    <div class="section">
        <div class="col2">
            <h3>$T('currentSchedules')</h3>
        </div><!-- /col2 -->
        <div class="col1">
            <fieldset>
                <!--#if $schedlines#-->
                        <!--#set $schednum = 0#-->
                        <!--#set $odd = True#-->
                        <!--#for $line in $schedlines#-->
                            <!--#set $odd = not $odd#-->
                            <form action="delSchedule" method="post">
                                <input type="hidden" name="session" id="session" value="$session">
                                <input type="hidden" name="line" id="line" value="$line"/>
                                <div class="field-pair infoTableSeperator<!--#if $odd then "" else " alt"#-->">
                                    <input class="float-left" type="submit" value="$T('button-x')" />
                                    <div class="scheduleEntry">
                                        <span class="time">$taskinfo[$schednum][1]:$taskinfo[$schednum][2]</span><span class="frequency">$taskinfo[$schednum][3]</span> <span class="darkred">$taskinfo[$schednum][4]</span>
                                    </div>
                                </div>
                            </form>
                            <!--#set $schednum = $schednum+1#-->
                        <!--#end for#-->
                <!--#else#-->
                    <div class="field-pair">
                        <label class="config">$T('none')</label>
                    </div>
                <!--#end if#-->
            </fieldset>
        </div><!-- /col1 -->
    </div><!-- /section -->
</div><!-- /colmask -->

<!--#include $webdir + "/_inc_footer_uc.tmpl"#-->
