142 lines
8.6 KiB
HTML
142 lines
8.6 KiB
HTML
<!DOCTYPE htm
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns:py="http://genshi.edgewall.org/"
|
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
|
<xi:include href="layout.html" />
|
|
<head>
|
|
<script type="text/javascript" src="${chrome.htdocs_location}js/wikitoolbar.js"></script>
|
|
<script type="text/javascript">
|
|
/* <![CDATA[ */
|
|
function toggleStatus() {
|
|
if ($('#is_periodic').is(':checked')) {
|
|
$('#recurrency-freq :input').removeAttr('disabled');
|
|
$('#recurrency-exceptions :input').removeAttr('disabled');
|
|
$('#recurrency-timeframe :input').removeAttr('disabled');
|
|
} else {
|
|
$('#recurrency-freq :input').attr('disabled', true);
|
|
$('#recurrency-exceptions :input').attr('disabled', true);
|
|
$('#recurrency-timeframe :input').attr('disabled', true);
|
|
}
|
|
}
|
|
jQuery(document).ready(function($) {
|
|
$("#until_date").datepicker({"dateFormat" : "dd.mm.yy"});
|
|
var ix = 2;
|
|
switch(${freq}){
|
|
case 0:
|
|
case 1:
|
|
case 2:
|
|
ix = 0;
|
|
break;
|
|
case 3:
|
|
case 4:
|
|
ix = 1;
|
|
break;
|
|
case 5:
|
|
ix = 2;
|
|
break;
|
|
case 6:
|
|
ix = 3;
|
|
break;
|
|
}
|
|
$("#accordion").accordion({header: "h3"}).accordion('activate', ix);
|
|
$("#exception_name").datepicker({"dateFormat" : "dd.mm.yy"});
|
|
toggleStatus();
|
|
});
|
|
/* ]]> */
|
|
</script>
|
|
<title>${'Edit Recurrency'}</title>
|
|
</head>
|
|
<body>
|
|
<div id="content">
|
|
<h1>Recurrency Options for event '${event.name}'</h1>
|
|
<h2 py:with="dt = selected_tz.normalize(event.time_begin.astimezone(selected_tz));
|
|
dt2 = selected_tz.normalize(event.time_end.astimezone(selected_tz))">${dt.strftime("%A, %d.%m.%Y %H:%M")} ${dt.tzinfo.tzname(None)} - ${dt2.strftime("%A, %d.%m.%Y %H:%M")} ${dt2.tzinfo.tzname(None)}</h2>
|
|
<form name="recurrence" id='recurrence' uri="" method="post" mime-type="text/plain" action="">
|
|
<fieldset>
|
|
<div class="mybuttons">
|
|
<input type="checkbox" id="is_periodic" name="is_periodic" value="${event.is_periodic}" checked="${event.is_periodic and 'checked' or None}" onchange="toggleStatus()"/><label for="is_periodic"> Repeat this event</label>
|
|
</div>
|
|
<fieldset id="recurrency-freq"><legend>Recurrency frequency</legend>
|
|
<div id="accordion">
|
|
<div>
|
|
<h3><a href="#">Yearly</a></h3>
|
|
<table>
|
|
<tr><td>Repeat every <input type="text" size="3" maxlength="3" name="yearinterval" value="${period.interval}"/> year(s)</td></tr>
|
|
<tr><td><input type="radio" name="freq" value="0" checked="${freq == 0 and 'checked' or None}"/><label for="monthday-yearly-0">Repeat on day</label>
|
|
<input type="text" size="3" maxlength="3" id="monthday-yearly-0" name="monthday-yearly-0" value="${period.bymonthday}"/>
|
|
<label for="monthname-yearly-0">in</label>
|
|
<select name="monthname-yearly-0"><option py:for="ix, x in enumerate(month_names)" value="${ix}" selected="${period.bymonth == ix and 'selected' or None}">${x}</option></select></td>
|
|
</tr>
|
|
<tr><td><input type="radio" name="freq" value="1" checked="${freq == 1 and 'checked' or None}"/><label for="dayocc-yearly-1">Repeat on</label>
|
|
<select id="dayocc-yearly-1" name="dayocc-yearly-1"><option py:for="ix, x in enumerate(weekday_names)" value="${ix}" selected="${period.byweekdayocc == ix and 'selected' or None}">${x}</option></select>
|
|
<select name="weekday-yearly-1"><option py:for="ix, x in enumerate(day_names)" value="${ix}" selected="${period.byweekday == ix and 'selected' or None}">${x}</option></select> in
|
|
<select name="monthname-yearly-1"><option py:for="ix, x in enumerate(month_names)" value="${ix}" selected="${period.bymonth == ix and 'selected' or None}">${x} </option></select></td>
|
|
</tr>
|
|
<tr><td><input type="radio" name="freq" value="2" checked="${freq == 2 and 'checked' or None}"/><label for="yearday">Repeat on day no.</label><input type="text" size="3" maxlength="3" id="yearday" name="yearday" value="${period.byyearday}"/><label for="yearday">of the year</label></td></tr>
|
|
</table>
|
|
</div>
|
|
<div>
|
|
<h3><a href="#">Monthly</a></h3>
|
|
<div>
|
|
<table class="event-wizard">
|
|
<tr><td><label for="monthinterval">Repeat every</label>
|
|
<input type="text" size="3" maxlength="3" id="monthinterval" name="monthinterval" value="${period.interval}"/>
|
|
<label for="monthinterval">month(s)</label></td></tr>
|
|
<tr><td><input type="radio" name="freq" value="3" checked="${freq == 3 and 'checked' or None}"/><label for="monthday-monthly-0">Repeat on</label>
|
|
<select id="monthday-monthly-0" name="monthday-monthly-0"><option py:for="ix, x in enumerate(monthday_names)" value="${ix}">${x}</option></select> day of the month</td></tr>
|
|
<tr><td><input type="radio" name="freq" value="4" checked="${freq == 4 and 'checked' or None}"/><label for="dayocc-monthly-1">Repeat on</label>
|
|
<select id="dayocc-monthly-1" name="dayocc-monthly-1"><option py:for="ix, x in enumerate(weekday_names)" value="${ix}" selected="${period.byweekdayocc == ix and 'selected' or None}">${x}</option></select>
|
|
<select name="weekday-monthly-1"><option py:for="ix, x in enumerate(day_names)" value="${ix}" selected="${ix in period.byweekday and 'selected' or None}">${x}</option></select></td></tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h3><a href="#">Weekly</a></h3>
|
|
<div>
|
|
<table class="event-wizard">
|
|
<tr><td><input type="radio" name="freq" value="5" checked="${freq == 5 and 'checked' or None}"/>Repeat every <input type="text" size="3" maxlength="3" name="weekinterval" value="${period.interval}"/> week(s)</td></tr>
|
|
<tr>
|
|
<td>
|
|
<py:for each="ix, x in enumerate(day_names)"><input type="checkbox" py:with="myid='weekday:%d' % ix" id="{$myid}" name="weekday-weekly" value="${ix}" checked="${ix in period.byweekday and 'selected' or None}"/><label for="{$myid}">${x}</label></py:for></td></tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h3><a href="#">Daily</a></h3>
|
|
<div>
|
|
<table class="event-wizard">
|
|
<tr><td><input type="radio" name="freq" value="6" checked="${freq == 6 and 'checked' or None}"/> Repeat every <input type="text" size="3" maxlength="3" name="dayinterval" value="${period.interval}"/> day(s)</td></tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<fieldset id="recurrency-timeframe"><legend>Recurrency Timeframe</legend>
|
|
<table class="event-wizard">
|
|
<tr><td><label for="repeatframe2">Finish after </label><input id="count" type="text" size="3" maxlength="3" name="count" value="${period.count}"/> Repetitions</td></tr>
|
|
<tr><td><label for="repeatframe3">End on:</label><input id="until_date" type="text" size="10" maxlength="10" name="until_date" value="${period.until and period.until.strftime('%d.%m.%Y') or None}"/></td>
|
|
</tr>
|
|
</table>
|
|
</fieldset>
|
|
<fieldset id="recurrency-exceptions"><legend>Recurrency Exceptions</legend>
|
|
<table class="event-wizard">
|
|
<tr><td class="left"><input type="text" id="exception_name" name="exception-name" size="10" value="${exception_name}"/></td>
|
|
<td rowspan="4"><ul id="exceptions">
|
|
<li py:for="exception in exceptions"><input type="checkbox" name="exception:${exception.erd_id}"/> ${exception.erd_datetime.strftime('%d.%m.%Y')}</li></ul>
|
|
</td></tr>
|
|
<tr><td class="left"><input type="submit" name="exception-add" value="add"/></td></tr>
|
|
<tr><td class="left"><input type="submit" name="exception-edit" value="edit"/></td></tr>
|
|
<tr><td class="left"><input type="submit" name="exception-delete" value="del"/></td></tr>
|
|
</table>
|
|
</fieldset>
|
|
<div class="mybuttons">
|
|
<input type="submit" name="save" value="save"/>
|
|
</div>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
</body>
|
|
</html>
|