<commit_before>{strip}
{title admpage="calendar"}{tr}Calendar Item{/tr}{/title}

<div class="navbar">
{if $tiki_p_view_calendar eq 'y'}
	{button href="tiki-calendar.php" _text="{tr}View Calendars{/tr}"}
{/if}
{if $tiki_p_admin_calendar eq 'y'}
	{button href="tiki-admin_calendars.php?calendarId=$calendarId" _text="{tr}Edit Calendar{/tr}"}
{/if}
{if $tiki_p_add_events eq 'y' and $id }
	{button href="tiki-calendar_edit_item.php" _text="{tr}New event{/tr}"}
{/if}
{if $id}
	{if $edit}
		{button href="tiki-calendar_edit_item.php?viewcalitemId=$id" _text="{tr}View event{/tr}"}
	{elseif $tiki_p_change_events eq 'y'}
		{button href="tiki-calendar_edit_item.php?calitemId=$id" _text="{tr}Edit/Delete event{/tr}"}
	{/if}
{/if}
{if $tiki_p_admin_calendar eq 'y'}
	{button href="tiki-admin_calendars.php" _text="{tr}Admin Calendars{/tr}"}
{/if}
</div>

<div class="wikitext">

{if $edit}
	{if $preview}
		<h2>{tr}Preview{/tr}</h2>
		{$calitem.parsedName}
		<div class="wikitext">{$calitem.parsed}</div>
		<h2>{if $id}{tr}Edit Calendar Item{/tr}{else}{tr}New Calendar Item{/tr}{/if}</h2>
	{/if}
	<form action="{$myurl}" method="post" name="f" id="editcalitem">
		<input type="hidden" name="save[user]" value="{$calitem.user}" />
		{if $id}
			<input type="hidden" name="save[calitemId]" value="{$id}" />
		{/if}
{/if}
{if $prefs.calendar_addtogooglecal == 'y'}
	{wikiplugin _name="addtogooglecal" calitemid=$id}{/wikiplugin}
{/if}
<table class="formcolor{if !$edit} vevent{/if}">
<tr>
	<td>{tr}Calendar{/tr}</td>
	<td style="background-color:#{$calendar.custombgcolor};color:#{$calendar.customfgcolor};">
{if $edit}
	{if $prefs.javascript_enabled eq 'n'}
		{$calendar.name|escape}<br />{tr}or{/tr}&nbsp;
		<input type="submit" name="changeCal" value="{tr}Go to{/tr}" />
	{/if}
		<select name="save[calendarId]" id="calid" onchange="javascript:document.getElementById('editcalitem').submit();">
			{foreach item=it key=itid from=$listcals}
				{if $it.tiki_p_add_events eq 'y'}
				<option value="{$it.calendarId}" style="background-color:#{$it.custombgcolor};color:#{$it.customfgcolor};"
				{if $calitem.calendarId}
					{if $calitem.calendarId eq $itid} selected="selected"{/if}
				{else}
					{if $calendarView}
						{if $calendarView eq $itid} selected="selected"{/if}
					{else}
						{if $calendarId}
							{if $calendarId eq $itid} selected="selected"{/if}
						{/if}
					{/if}
				{/if}>{$it.name|escape}</option>
				{/if}
			{/foreach}
		</select>
{else}
	{$listcals[$calitem.calendarId].name|escape}
{/if}
	</td>
</tr>

<tr>
<td>{tr}Title{/tr}</td>
<td>
{if $edit}
	<input type="text" name="save[name]" value="{$calitem.name|escape}" size="32" style="width:90%;"/>
{else}
	<span class="summary">{$calitem.name|escape}</span>
{/if}
</td>
</tr>
<tr>
	<td>{tr}Recurrence{/tr}</td>
	<td>
{if $edit}
	{if $recurrence.id gt 0}
	<input type="hidden" name="recurrent" value="1"/>
		{tr}This event depends on a recurrence rule{/tr}
	{else}
<input type="checkbox" id="id_recurrent" name="recurrent" value="1" onclick="toggle('recurrenceRules');toggle('startdate');toggle('enddate')"{if $calitem.recurrenceId gt 0 or $recurrent eq 1}checked="checked"{/if}/><label for="id_recurrent">{tr}This event depends on a recurrence rule{/tr}</label>
	{/if}
{else}
	<span class="summary">{if $calitem.recurrenceId gt 0}{tr}This event depends on a recurrence rule{/tr}{else}{tr}This event is not recurrent{/tr}{/if}</span>
{/if}
	</td>
</tr>
<tr>
	<td>&nbsp;</td>
	<td style="padding:5px 10px">
{if $edit}
	  <div id="recurrenceRules" style="width:100%;{if ( !($calitem.recurrenceId gt 0) and $recurrent neq 1 ) && $prefs.javascript_enabled eq 'y'}display:none;{/if}">
	  {if $calitem.recurrenceId gt 0}<input type="hidden" name="recurrenceId" value="{$recurrence.id}" />{/if}
{if $recurrence.id gt 0}
	{if $recurrence.weekly}
	  <input type="hidden" name="recurrenceType" value="weekly" />{tr}On a weekly basis{/tr}<br />
	{/if}
{else}
	  <input type="radio" id="id_recurrenceTypeW" name="recurrenceType" value="weekly" {if $recurrence.weekly or $calitem.calitemId eq 0}checked="checked"{/if}/><label for="id_recurrenceTypeW">{tr}On a weekly basis{/tr}</label><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{/if}
{if $recurrence.id eq 0 or $recurrence.weekly}
			  {tr}Each{/tr}&nbsp;
			  <select name="weekday">
				<option value="0" {if $recurrence.weekday eq '0'}selected="selected"{/if}>{tr}Sunday{/tr}</option>
				<option value="1" {if $recurrence.weekday eq '1'}selected="selected"{/if}>{tr}Monday{/tr}</option>
				<option value="2" {if $recurrence.weekday eq '2'}selected="selected"{/if}>{tr}Tuesday{/tr}</option>
				<option value="3" {if $recurrence.weekday eq '3'}selected="selected"{/if}>{tr}Wednesday{/tr}</option>
				<option value="4" {if $recurrence.weekday eq '4'}selected="selected"{/if}>{tr}Thursday{/tr}</option>
				<option value="5" {if $recurrence.weekday eq '5'}selected="selected"{/if}>{tr}Friday{/tr}</option>
				<option value="6" {if $recurrence.weekday eq '6'}selected="selected"{/if}>{tr}Saturday{/tr}</option>
			  </select>
			  &nbsp;{tr}of the week{/tr}
		<br /><hr style="width:75%"/>
{/if}
{if $recurrence.id gt 0}
	{if $recurrence.monthly}
	  <input type="hidden" name="recurrenceType" value="monthly" />{tr}On a monthly basis{/tr}<br />
	{/if}
{else}
		<input type="radio" id="id_recurrenceTypeM" name="recurrenceType" value="monthly" {if $recurrence.monthly}checked="checked"{/if}/><label for="id_recurrenceTypeM">{tr}On a monthly basis{/tr}</label><br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{/if}
{if $recurrence.id eq 0 or $recurrence.monthly}
			  {tr}Each{/tr}&nbsp;
			  <select name="dayOfMonth">
				{section name=k start=1 loop=32}
				<option value="{$smarty.section.k.index}" {if $recurrence.dayOfMonth eq $smarty.section.k.index}selected="selected"{/if}>{if $smarty.section.k.index lt 10}0{/if}{$smarty.section.k.index}</option>
				{/section}
			  </select>
			  &nbsp;{tr}of the month{/tr}
		<br /><hr style="width:75%"/>
{/if}
{if $recurrence.id gt 0}
	{if $recurrence.yearly}
	  <input type="hidden" name="recurrenceType" value="yearly" />{tr}On a yearly basis{/tr}<br />
	{/if}
{else}
		<input type="radio" id="id_recurrenceTypeY" name="recurrenceType" value="yearly" {if $recurrence.yearly}checked="checked"{/if}/><label for="id_recurrenceTypeY">{tr}On a yearly basis{/tr}</label><br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{/if}
{if $recurrence.id eq 0 or $recurrence.yearly}
			  {tr}Each{/tr}&nbsp;
			  <select name="dateOfYear_day" onChange="checkDateOfYear(this.options[this.selectedIndex].value,document.forms['f'].elements['dateOfYear_month'].options[document.forms['f'].elements['dateOfYear_month'].selectedIndex].value);">
				{section name=k start=1 loop=32}
				<option value="{$smarty.section.k.index}" {if $recurrence.dateOfYear_day eq $smarty.section.k.index}selected="selected"{/if}>{if $smarty.section.k.index lt 10}0{/if}{$smarty.section.k.index}</option>
				{/section}
			  </select>
			  &nbsp;{tr}of{/tr}&nbsp;
			  <select name="dateOfYear_month" onChange="checkDateOfYear(document.forms['f'].elements['dateOfYear_day'].options[document.forms['f'].elements['dateOfYear_day'].selectedIndex].value,this.options[this.selectedIndex].value);">
				<option value="1"  {if $recurrence.dateOfYear_month eq '1'}selected="selected"{/if}>{tr}January{/tr}</option>
				<option value="2"  {if $recurrence.dateOfYear_month eq '2'}selected="selected"{/if}>{tr}February{/tr}</option>
				<option value="3"  {if $recurrence.dateOfYear_month eq '3'}selected="selected"{/if}>{tr}March{/tr}</option>
				<option value="4"  {if $recurrence.dateOfYear_month eq '4'}selected="selected"{/if}>{tr}April{/tr}</option>
				<option value="5"  {if $recurrence.dateOfYear_month eq '5'}selected="selected"{/if}>{tr}May{/tr}</option>
				<option value="6"  {if $recurrence.dateOfYear_month eq '6'}selected="selected"{/if}>{tr}June{/tr}</option>
				<option value="7"  {if $recurrence.dateOfYear_month eq '7'}selected="selected"{/if}>{tr}July{/tr}</option>
				<option value="8"  {if $recurrence.dateOfYear_month eq '8'}selected="selected"{/if}>{tr}August{/tr}</option>
				<option value="9"  {if $recurrence.dateOfYear_month eq '9'}selected="selected"{/if}>{tr}September{/tr}</option>
				<option value="10" {if $recurrence.dateOfYear_month eq '10'}selected="selected"{/if}>{tr}October{/tr}</option>
				<option value="11" {if $recurrence.dateOfYear_month eq '11'}selected="selected"{/if}>{tr}November{/tr}</option>
				<option value="12" {if $recurrence.dateOfYear_month eq '12'}selected="selected"{/if}>{tr}December{/tr}</option>
			  </select>
&nbsp;&nbsp;
			  <span id="errorDateOfYear" style="color:#900;"></span>
		<br /><br /><hr />
{/if}
		<br />
{if $recurrence.id gt 0}
	<input type="hidden" name="startPeriod" value="{$recurrence.startPeriod}"/>
	<input type="hidden" name="nbRecurrences" value="{$recurrence.nbRecurrences}"/>
	<input type="hidden" name="endPeriod" value="{$recurrence.endPeriod}"/>
	{tr}Starting on{/tr} {$recurrence.startPeriod|tiki_long_date},&nbsp;
	{if $recurrence.endPeriod gt 0}{tr}ending by{/tr} {$recurrence.endPeriod|tiki_long_date}{else}{tr}ending after{/tr} {$recurrence.nbRecurrences} {tr}events{/tr}{/if}.
{else}
		{tr}Start period{/tr} :
		{if $prefs.feature_jscalendar eq 'y' and $prefs.javascript_enabled eq 'y'}
			{jscalendar id="startPeriod" date=$recurrence.startPeriod fieldname="startPeriod" align="Bc" showtime='n'}
		{else}
			{html_select_date prefix="startPeriod_" time=$recurrence.startPeriod field_order=$prefs.display_field_order start_year=$prefs.calendar_start_year end_year=$prefs.calendar_end_year}
		{/if}
		<br /><hr style="width:75%"/>
		<input type="radio" id="id_endTypeNb" name="endType" value="nb" {if $recurrence.nbRecurrences or $calitem.calitemId eq 0}checked="checked"{/if}/>&nbsp;<label for="id_endTypeNb">{tr}End after{/tr}</label>
		<input type="text" name="nbRecurrences" size="3" style="text-align:right" value="{if $recurrence.nbRecurrences gt 0}{$recurrence.nbRecurrences}{else}{if $calitem.calitemId eq 0}1{/if}{/if}"/>{tr}occurrences{/tr}<br />
		<input type="radio" id="id_endTypeDt" name="endType" value="dt" {if $recurrence.endPeriod gt 0}checked="checked"{/if}/>&nbsp;<label for="id_endTypeDt">{tr}End before{/tr}</label>
		{if $prefs.feature_jscalendar eq 'y' and $prefs.javascript_enabled eq 'y'}
			{jscalendar id="endPeriod" date=$recurrence.endPeriod fieldname="endPeriod" align="Bc" showtime='n'}
		{else}
			{html_select_date prefix="endPeriod_" time=$recurrence.endPeriod field_order=$prefs.display_field_order start_year=$prefs.calendar_start_year end_year=$prefs.calendar_end_year}
		{/if}
{/if}
		<br />&nbsp;
	  </div>
{else}
	{if $recurrence.id > 0}
		{if $recurrence.weekly}
	  		{tr}Event is repeated{/tr} {if $recurrence.nbRecurrences gt 0}{$recurrence.nbRecurrences} {tr}times{/tr}, {/if}{tr}every{/tr}&nbsp;{tr}{$daysnames[$recurrence.weekday]}{/tr}
		{elseif $recurrence.monthly}
	  		{tr}Event is repeated{/tr} {if $recurrence.nbRecurrences gt 0}{$recurrence.nbRecurrences} {tr}times{/tr}, {/if}{tr}on{/tr}&nbsp;{$recurrence.dayOfMonth} {tr}of every month{/tr}
		{else}
	  		{tr}Event is repeated{/tr} {if $recurrence.nbRecurrences gt 0}{$recurrence.nbRecurrences} {tr}times{/tr}, {/if}{tr}on each{/tr}&nbsp;{$recurrence.dateOfYear_day} {tr}of{/tr} {tr}{$monthnames[$recurrence.dateOfYear_month]}{/tr}
		{/if}
	<br />
	{tr}Starting on{/tr} {$recurrence.startPeriod|tiki_long_date}
	{if $recurrence.endPeriod gt 0}, {tr}ending by{/tr} {$recurrence.endPeriod|tiki_long_date}{/if}.
	{/if}
{/if}
	</td>
</tr>
<tr>
<td>{tr}Start{/tr}</td>
<td>
{if $edit}
	<table cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td style="border:0;padding-top:2px;vertical-align:middle">
			{if $prefs.feature_jscalendar neq 'y' or $prefs.javascript_enabled neq 'y'}
				<a href="#" onclick="document.f.Time_Hour.selectedIndex=(document.f.Time_Hour.selectedIndex+1);return false;">{icon _id='plus_small' align='left' width='11' height='8'}</a>
			{/if}
			</td>
			<td rowspan="2" style="border:0;padding-top:2px;vertical-align:middle"><div style="display:block" id="startdate">
			{if $prefs.feature_jscalendar eq 'y' and $prefs.javascript_enabled eq 'y'}
				{jscalendar id="start" date=$calitem.start fieldname="save[date_start]" align="Bc" showtime='n'}
			{else}
				{html_select_date prefix="start_date_" time=$calitem.start field_order=$prefs.display_field_order start_year=$prefs.calendar_start_year end_year=$prefs.calendar_end_year}
			{/if}
			</div></td>
			<td style="border:0;padding-top:2px;vertical-align:middle">
				<span id="starttimehourplus" style="display: {if $calitem.allday} none {else} inline {/if}"><a href="#" onclick="document.f.start_Hour.selectedIndex=(document.f.start_Hour.selectedIndex+1);return false;">{icon _id='plus_small' align='left' width='11' height='8'}</a></span>
			</td>
			<td rowspan="2" style="border:0;vertical-align:middle" class="html_select_time">
				<span id="starttime" style="display: {if $calitem.allday} none {else} inline {/if}">{html_select_time prefix="start_" display_seconds=false time=$calitem.start minute_interval=$prefs.calendar_timespan hour_minmax=$hour_minmax}</span>
			</td>
			<td style="border:0;padding-top:2px;vertical-align:middle">
				<span id="starttimeminplus" style="display: {if $calitem.allday} none {else} inline {/if}"><a href="#" onclick="document.f.start_Minute.selectedIndex=(document.f.start_Minute.selectedIndex+1);return false;">{icon _id='plus_small' align='left' width='11' height='8'}</a></span>
			</td>
			<td style="border:0;padding-top:2px;vertical-align:middle;" rowspan="2">
				<label for="alldayid">
				<input type="checkbox" id="alldayid" name="allday" 
					   onclick="toggleSpan('starttimehourplus');
					   			toggleSpan('starttimehourminus');
					   			toggleSpan('starttime');
					   			toggleSpan('starttimeminplus');
					   			toggleSpan('starttimeminminus');
					   			toggleSpan('endtimehourplus');
					   			toggleSpan('endtimehourminus');
					   			toggleSpan('endtime');
					   			toggleSpan('endtimeminplus');
					   			toggleSpan('endtimeminminus');
					   			toggleSpan('durhourplus');
					   			toggleSpan('durhourminus');
					   			toggleSpan('duration');
					   			toggleSpan('duratione');
					   			toggleSpan('durminplus');
					   			toggleSpan('durminminus');return false;"
					   value="true" {if $calitem.allday} checked="checked" {/if} /> {tr}All day{/tr}</label>
			</td><commit_msg>[FIX] Calendar: allow all day item again<commit_after>{strip}
{title admpage="calendar"}{tr}Calendar Item{/tr}{/title}

<div class="navbar">
{if $tiki_p_view_calendar eq 'y'}
	{button href="tiki-calendar.php" _text="{tr}View Calendars{/tr}"}
{/if}
{if $tiki_p_admin_calendar eq 'y'}
	{button href="tiki-admin_calendars.php?calendarId=$calendarId" _text="{tr}Edit Calendar{/tr}"}
{/if}
{if $tiki_p_add_events eq 'y' and $id }
	{button href="tiki-calendar_edit_item.php" _text="{tr}New event{/tr}"}
{/if}
{if $id}
	{if $edit}
		{button href="tiki-calendar_edit_item.php?viewcalitemId=$id" _text="{tr}View event{/tr}"}
	{elseif $tiki_p_change_events eq 'y'}
		{button href="tiki-calendar_edit_item.php?calitemId=$id" _text="{tr}Edit/Delete event{/tr}"}
	{/if}
{/if}
{if $tiki_p_admin_calendar eq 'y'}
	{button href="tiki-admin_calendars.php" _text="{tr}Admin Calendars{/tr}"}
{/if}
</div>

<div class="wikitext">

{if $edit}
	{if $preview}
		<h2>{tr}Preview{/tr}</h2>
		{$calitem.parsedName}
		<div class="wikitext">{$calitem.parsed}</div>
		<h2>{if $id}{tr}Edit Calendar Item{/tr}{else}{tr}New Calendar Item{/tr}{/if}</h2>
	{/if}
	<form action="{$myurl}" method="post" name="f" id="editcalitem">
		<input type="hidden" name="save[user]" value="{$calitem.user}" />
		{if $id}
			<input type="hidden" name="save[calitemId]" value="{$id}" />
		{/if}
{/if}
{if $prefs.calendar_addtogooglecal == 'y'}
	{wikiplugin _name="addtogooglecal" calitemid=$id}{/wikiplugin}
{/if}
<table class="formcolor{if !$edit} vevent{/if}">
<tr>
	<td>{tr}Calendar{/tr}</td>
	<td style="background-color:#{$calendar.custombgcolor};color:#{$calendar.customfgcolor};">
{if $edit}
	{if $prefs.javascript_enabled eq 'n'}
		{$calendar.name|escape}<br />{tr}or{/tr}&nbsp;
		<input type="submit" name="changeCal" value="{tr}Go to{/tr}" />
	{/if}
		<select name="save[calendarId]" id="calid" onchange="javascript:document.getElementById('editcalitem').submit();">
			{foreach item=it key=itid from=$listcals}
				{if $it.tiki_p_add_events eq 'y'}
				<option value="{$it.calendarId}" style="background-color:#{$it.custombgcolor};color:#{$it.customfgcolor};"
				{if $calitem.calendarId}
					{if $calitem.calendarId eq $itid} selected="selected"{/if}
				{else}
					{if $calendarView}
						{if $calendarView eq $itid} selected="selected"{/if}
					{else}
						{if $calendarId}
							{if $calendarId eq $itid} selected="selected"{/if}
						{/if}
					{/if}
				{/if}>{$it.name|escape}</option>
				{/if}
			{/foreach}
		</select>
{else}
	{$listcals[$calitem.calendarId].name|escape}
{/if}
	</td>
</tr>

<tr>
<td>{tr}Title{/tr}</td>
<td>
{if $edit}
	<input type="text" name="save[name]" value="{$calitem.name|escape}" size="32" style="width:90%;"/>
{else}
	<span class="summary">{$calitem.name|escape}</span>
{/if}
</td>
</tr>
<tr>
	<td>{tr}Recurrence{/tr}</td>
	<td>
{if $edit}
	{if $recurrence.id gt 0}
	<input type="hidden" name="recurrent" value="1"/>
		{tr}This event depends on a recurrence rule{/tr}
	{else}
<input type="checkbox" id="id_recurrent" name="recurrent" value="1" onclick="toggle('recurrenceRules');toggle('startdate');toggle('enddate')"{if $calitem.recurrenceId gt 0 or $recurrent eq 1}checked="checked"{/if}/><label for="id_recurrent">{tr}This event depends on a recurrence rule{/tr}</label>
	{/if}
{else}
	<span class="summary">{if $calitem.recurrenceId gt 0}{tr}This event depends on a recurrence rule{/tr}{else}{tr}This event is not recurrent{/tr}{/if}</span>
{/if}
	</td>
</tr>
<tr>
	<td>&nbsp;</td>
	<td style="padding:5px 10px">
{if $edit}
	  <div id="recurrenceRules" style="width:100%;{if ( !($calitem.recurrenceId gt 0) and $recurrent neq 1 ) && $prefs.javascript_enabled eq 'y'}display:none;{/if}">
	  {if $calitem.recurrenceId gt 0}<input type="hidden" name="recurrenceId" value="{$recurrence.id}" />{/if}
{if $recurrence.id gt 0}
	{if $recurrence.weekly}
	  <input type="hidden" name="recurrenceType" value="weekly" />{tr}On a weekly basis{/tr}<br />
	{/if}
{else}
	  <input type="radio" id="id_recurrenceTypeW" name="recurrenceType" value="weekly" {if $recurrence.weekly or $calitem.calitemId eq 0}checked="checked"{/if}/><label for="id_recurrenceTypeW">{tr}On a weekly basis{/tr}</label><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{/if}
{if $recurrence.id eq 0 or $recurrence.weekly}
			  {tr}Each{/tr}&nbsp;
			  <select name="weekday">
				<option value="0" {if $recurrence.weekday eq '0'}selected="selected"{/if}>{tr}Sunday{/tr}</option>
				<option value="1" {if $recurrence.weekday eq '1'}selected="selected"{/if}>{tr}Monday{/tr}</option>
				<option value="2" {if $recurrence.weekday eq '2'}selected="selected"{/if}>{tr}Tuesday{/tr}</option>
				<option value="3" {if $recurrence.weekday eq '3'}selected="selected"{/if}>{tr}Wednesday{/tr}</option>
				<option value="4" {if $recurrence.weekday eq '4'}selected="selected"{/if}>{tr}Thursday{/tr}</option>
				<option value="5" {if $recurrence.weekday eq '5'}selected="selected"{/if}>{tr}Friday{/tr}</option>
				<option value="6" {if $recurrence.weekday eq '6'}selected="selected"{/if}>{tr}Saturday{/tr}</option>
			  </select>
			  &nbsp;{tr}of the week{/tr}
		<br /><hr style="width:75%"/>
{/if}
{if $recurrence.id gt 0}
	{if $recurrence.monthly}
	  <input type="hidden" name="recurrenceType" value="monthly" />{tr}On a monthly basis{/tr}<br />
	{/if}
{else}
		<input type="radio" id="id_recurrenceTypeM" name="recurrenceType" value="monthly" {if $recurrence.monthly}checked="checked"{/if}/><label for="id_recurrenceTypeM">{tr}On a monthly basis{/tr}</label><br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{/if}
{if $recurrence.id eq 0 or $recurrence.monthly}
			  {tr}Each{/tr}&nbsp;
			  <select name="dayOfMonth">
				{section name=k start=1 loop=32}
				<option value="{$smarty.section.k.index}" {if $recurrence.dayOfMonth eq $smarty.section.k.index}selected="selected"{/if}>{if $smarty.section.k.index lt 10}0{/if}{$smarty.section.k.index}</option>
				{/section}
			  </select>
			  &nbsp;{tr}of the month{/tr}
		<br /><hr style="width:75%"/>
{/if}
{if $recurrence.id gt 0}
	{if $recurrence.yearly}
	  <input type="hidden" name="recurrenceType" value="yearly" />{tr}On a yearly basis{/tr}<br />
	{/if}
{else}
		<input type="radio" id="id_recurrenceTypeY" name="recurrenceType" value="yearly" {if $recurrence.yearly}checked="checked"{/if}/><label for="id_recurrenceTypeY">{tr}On a yearly basis{/tr}</label><br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{/if}
{if $recurrence.id eq 0 or $recurrence.yearly}
			  {tr}Each{/tr}&nbsp;
			  <select name="dateOfYear_day" onChange="checkDateOfYear(this.options[this.selectedIndex].value,document.forms['f'].elements['dateOfYear_month'].options[document.forms['f'].elements['dateOfYear_month'].selectedIndex].value);">
				{section name=k start=1 loop=32}
				<option value="{$smarty.section.k.index}" {if $recurrence.dateOfYear_day eq $smarty.section.k.index}selected="selected"{/if}>{if $smarty.section.k.index lt 10}0{/if}{$smarty.section.k.index}</option>
				{/section}
			  </select>
			  &nbsp;{tr}of{/tr}&nbsp;
			  <select name="dateOfYear_month" onChange="checkDateOfYear(document.forms['f'].elements['dateOfYear_day'].options[document.forms['f'].elements['dateOfYear_day'].selectedIndex].value,this.options[this.selectedIndex].value);">
				<option value="1"  {if $recurrence.dateOfYear_month eq '1'}selected="selected"{/if}>{tr}January{/tr}</option>
				<option value="2"  {if $recurrence.dateOfYear_month eq '2'}selected="selected"{/if}>{tr}February{/tr}</option>
				<option value="3"  {if $recurrence.dateOfYear_month eq '3'}selected="selected"{/if}>{tr}March{/tr}</option>
				<option value="4"  {if $recurrence.dateOfYear_month eq '4'}selected="selected"{/if}>{tr}April{/tr}</option>
				<option value="5"  {if $recurrence.dateOfYear_month eq '5'}selected="selected"{/if}>{tr}May{/tr}</option>
				<option value="6"  {if $recurrence.dateOfYear_month eq '6'}selected="selected"{/if}>{tr}June{/tr}</option>
				<option value="7"  {if $recurrence.dateOfYear_month eq '7'}selected="selected"{/if}>{tr}July{/tr}</option>
				<option value="8"  {if $recurrence.dateOfYear_month eq '8'}selected="selected"{/if}>{tr}August{/tr}</option>
				<option value="9"  {if $recurrence.dateOfYear_month eq '9'}selected="selected"{/if}>{tr}September{/tr}</option>
				<option value="10" {if $recurrence.dateOfYear_month eq '10'}selected="selected"{/if}>{tr}October{/tr}</option>
				<option value="11" {if $recurrence.dateOfYear_month eq '11'}selected="selected"{/if}>{tr}November{/tr}</option>
				<option value="12" {if $recurrence.dateOfYear_month eq '12'}selected="selected"{/if}>{tr}December{/tr}</option>
			  </select>
&nbsp;&nbsp;
			  <span id="errorDateOfYear" style="color:#900;"></span>
		<br /><br /><hr />
{/if}
		<br />
{if $recurrence.id gt 0}
	<input type="hidden" name="startPeriod" value="{$recurrence.startPeriod}"/>
	<input type="hidden" name="nbRecurrences" value="{$recurrence.nbRecurrences}"/>
	<input type="hidden" name="endPeriod" value="{$recurrence.endPeriod}"/>
	{tr}Starting on{/tr} {$recurrence.startPeriod|tiki_long_date},&nbsp;
	{if $recurrence.endPeriod gt 0}{tr}ending by{/tr} {$recurrence.endPeriod|tiki_long_date}{else}{tr}ending after{/tr} {$recurrence.nbRecurrences} {tr}events{/tr}{/if}.
{else}
		{tr}Start period{/tr} :
		{if $prefs.feature_jscalendar eq 'y' and $prefs.javascript_enabled eq 'y'}
			{jscalendar id="startPeriod" date=$recurrence.startPeriod fieldname="startPeriod" align="Bc" showtime='n'}
		{else}
			{html_select_date prefix="startPeriod_" time=$recurrence.startPeriod field_order=$prefs.display_field_order start_year=$prefs.calendar_start_year end_year=$prefs.calendar_end_year}
		{/if}
		<br /><hr style="width:75%"/>
		<input type="radio" id="id_endTypeNb" name="endType" value="nb" {if $recurrence.nbRecurrences or $calitem.calitemId eq 0}checked="checked"{/if}/>&nbsp;<label for="id_endTypeNb">{tr}End after{/tr}</label>
		<input type="text" name="nbRecurrences" size="3" style="text-align:right" value="{if $recurrence.nbRecurrences gt 0}{$recurrence.nbRecurrences}{else}{if $calitem.calitemId eq 0}1{/if}{/if}"/>{tr}occurrences{/tr}<br />
		<input type="radio" id="id_endTypeDt" name="endType" value="dt" {if $recurrence.endPeriod gt 0}checked="checked"{/if}/>&nbsp;<label for="id_endTypeDt">{tr}End before{/tr}</label>
		{if $prefs.feature_jscalendar eq 'y' and $prefs.javascript_enabled eq 'y'}
			{jscalendar id="endPeriod" date=$recurrence.endPeriod fieldname="endPeriod" align="Bc" showtime='n'}
		{else}
			{html_select_date prefix="endPeriod_" time=$recurrence.endPeriod field_order=$prefs.display_field_order start_year=$prefs.calendar_start_year end_year=$prefs.calendar_end_year}
		{/if}
{/if}
		<br />&nbsp;
	  </div>
{else}
	{if $recurrence.id > 0}
		{if $recurrence.weekly}
	  		{tr}Event is repeated{/tr} {if $recurrence.nbRecurrences gt 0}{$recurrence.nbRecurrences} {tr}times{/tr}, {/if}{tr}every{/tr}&nbsp;{tr}{$daysnames[$recurrence.weekday]}{/tr}
		{elseif $recurrence.monthly}
	  		{tr}Event is repeated{/tr} {if $recurrence.nbRecurrences gt 0}{$recurrence.nbRecurrences} {tr}times{/tr}, {/if}{tr}on{/tr}&nbsp;{$recurrence.dayOfMonth} {tr}of every month{/tr}
		{else}
	  		{tr}Event is repeated{/tr} {if $recurrence.nbRecurrences gt 0}{$recurrence.nbRecurrences} {tr}times{/tr}, {/if}{tr}on each{/tr}&nbsp;{$recurrence.dateOfYear_day} {tr}of{/tr} {tr}{$monthnames[$recurrence.dateOfYear_month]}{/tr}
		{/if}
	<br />
	{tr}Starting on{/tr} {$recurrence.startPeriod|tiki_long_date}
	{if $recurrence.endPeriod gt 0}, {tr}ending by{/tr} {$recurrence.endPeriod|tiki_long_date}{/if}.
	{/if}
{/if}
	</td>
</tr>
<tr>
<td>{tr}Start{/tr}</td>
<td>
{if $edit}
	<table cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td style="border:0;padding-top:2px;vertical-align:middle">
			{if $prefs.feature_jscalendar neq 'y' or $prefs.javascript_enabled neq 'y'}
				<a href="#" onclick="document.f.Time_Hour.selectedIndex=(document.f.Time_Hour.selectedIndex+1);return false;">{icon _id='plus_small' align='left' width='11' height='8'}</a>
			{/if}
			</td>
			<td rowspan="2" style="border:0;padding-top:2px;vertical-align:middle"><div style="display:block" id="startdate">
			{if $prefs.feature_jscalendar eq 'y' and $prefs.javascript_enabled eq 'y'}
				{jscalendar id="start" date=$calitem.start fieldname="save[date_start]" align="Bc" showtime='n'}
			{else}
				{html_select_date prefix="start_date_" time=$calitem.start field_order=$prefs.display_field_order start_year=$prefs.calendar_start_year end_year=$prefs.calendar_end_year}
			{/if}
			</div></td>
			<td style="border:0;padding-top:2px;vertical-align:middle">
				<span id="starttimehourplus" style="display: {if $calitem.allday} none {else} inline {/if}"><a href="#" onclick="document.f.start_Hour.selectedIndex=(document.f.start_Hour.selectedIndex+1);return false;">{icon _id='plus_small' align='left' width='11' height='8'}</a></span>
			</td>
			<td rowspan="2" style="border:0;vertical-align:middle" class="html_select_time">
				<span id="starttime" style="display: {if $calitem.allday} none {else} inline {/if}">{html_select_time prefix="start_" display_seconds=false time=$calitem.start minute_interval=$prefs.calendar_timespan hour_minmax=$hour_minmax}</span>
			</td>
			<td style="border:0;padding-top:2px;vertical-align:middle">
				<span id="starttimeminplus" style="display: {if $calitem.allday} none {else} inline {/if}"><a href="#" onclick="document.f.start_Minute.selectedIndex=(document.f.start_Minute.selectedIndex+1);return false;">{icon _id='plus_small' align='left' width='11' height='8'}</a></span>
			</td>
			<td style="border:0;padding-top:2px;vertical-align:middle;" rowspan="2">
				<label for="alldayid">
				<input type="checkbox" id="alldayid" name="allday" 
					   onclick="toggleSpan('starttimehourplus');
					   			toggleSpan('starttimehourminus');
					   			toggleSpan('starttime');
					   			toggleSpan('starttimeminplus');
					   			toggleSpan('starttimeminminus');
					   			toggleSpan('endtimehourplus');
					   			toggleSpan('endtimehourminus');
					   			toggleSpan('endtime');
					   			toggleSpan('endtimeminplus');
					   			toggleSpan('endtimeminminus');
					   			toggleSpan('durhourplus');
					   			toggleSpan('durhourminus');
					   			toggleSpan('duration');
					   			toggleSpan('duratione');
					   			toggleSpan('durminplus');
					   			toggleSpan('durminminus');"
					   value="true" {if $calitem.allday} checked="checked" {/if} /> {tr}All day{/tr}</label>
			</td>
{'fraction_non_alphanumeric': 0.20617130206171302, 'fraction_numerical': 0.009478345094783451, 'mean_word_length': 5.834278959810875, 'pattern_counts': {'":': 0, '<': 369, '<?xml version=': 0, '>': 371, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3383547', 'n_tokens_mistral': 12168, 'n_tokens_neox': 11089, 'n_words': 1800}