File Manager
<style type="text/css">
@media screen and (max-width: 1200px) {
.grid_8 {
width: auto !important;
}
.grid_4 {
width: auto !important;
}
}
textarea {
width: initial;
height: initial;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
var autochange_enddate = {if $event.event_id > 0}0{else}1{/if};
$('#update_children').click(function(){
$('#recur_all').toggle();
});
$('#startdate :input').change(function(){
if( !autochange_enddate ) return;
var name = $(this).attr('name').replace('start','end');
var name2 = $(this).attr('name').replace('startdate','event_recur_date');
var s = ":input[name='" + name + "']";
$(s).val($(this).val());
var s2 = ":input[name='" + name2 + "']";
$(s2).val($(this).val());
});
$('#startdate :input').trigger('change');
$('#enddate :input').change(function(){
autochange_enddate = 0;
})
$('#all_day_event').click(function(){
if( $(this).attr('checked') ) {
$('#starttime').hide();
$('#endtime').hide();
}
else {
$('#starttime').show();
$('#endtime').show();
}
});
$('#enddate_valid').click(function(){
if( $(this).attr('checked') ) {
$('#enddate').show();
}
else {
$('#enddate').hide();
}
});
});
function handleDropdown()
{
var labels = new Array();
labels["daily"] = "{$mod->Lang('plural_daily')}";
labels["weekly"] = "{$mod->Lang('plural_weekly')}";
labels["monthly"] = "{$mod->Lang('plural_monthly')}";
labels["yearly"] = "{$mod->Lang('plural_yearly')}";
var el = document.getElementById('recurdetails');
var el2 = document.getElementById('recurperiod');
var weekly = document.getElementById('recur_weekly');
var el4 = document.getElementById('intervallabel');
var monthly = document.getElementById('recur_monthly');
var idx = el2.selectedIndex;
var val = el2[idx].value;
var txt = 'inline';
var txt_weekly = 'none';
var txt_monthly = 'none';
if( val == 'none' )
{
txt = 'none';
txt_weekly = 'none';
txt_monthly = 'none';
}
else if( val == 'weekly' )
{
txt = 'inline';
txt_weekly = 'block';
txt_monthly = 'none';
}
else if( val == 'monthly' )
{
txt = 'inline';
txt_weekly = 'none';
txt_monthly = 'block';
}
el.style.display = txt;
weekly.style.display = txt_weekly;
monthly.style.display = txt_monthly;
el4.innerHTML = labels[val];
}
</script>
{if $event.event_id > 0}
<h3>{$mod->Lang('edit_event')}</h3>
{else}
<h3>{$mod->Lang('cal_addevent')}</h3>
{/if}
{if $event.event_id > 0 && $event.event_parent_id > 0}
<div class="information" style="display: block;">{$mod->Lang('info_edit_childevent')}</div>
{/if}
{if $event.event_id > 0 && $event.event_recur_period != 'none' && $event.event_parent_id == -1}
<div class="information" style="display: block;">{$mod->Lang('info_edit_parentevent')}</div>
{/if}
{$formstart}{$hidden|default:''}
<div class="pageoverflow">
<p class="pageinput">
<input type="submit" name="{$actionid}submit" value="{$mod->Lang('submit')}"/>
<input type="submit" name="{$actionid}cancel" value="{$mod->Lang('cancel')}"/>
</p>
</div>
{capture assign='use24'}{$mod->GetPreference('use_twelve_hour_clock')}{/capture}
{if $use24 == 1}
{assign var='use24' value=0}
{else}
{assign var='use24' value=1}
{/if}
<div class="c_full">
<div class="grid_8" style="margin-left: 0;">
<div class="pageoverflow">
<p class="pagetext">*{$mod->Lang('cal_fromdate')}:</p>
<p class="pageinput">
{capture assign='tmp'}{$actionid}startdate_{/capture}
<span id="startdate">{html_select_date prefix=$tmp time=$event.event_date_start_ut start_year=$start_year end_year=$end_year}</span>
<span id="starttime"{if $event.all_day_event == 1} style="display: none;"{/if}> <span style="padding-right: 0.5em;">@</span> {html_select_time use_24_hours=$use24 prefix=$tmp time=$event.event_date_start_ut minute_interval=15 display_seconds=false}</span>
All Day: <input type="checkbox" name="{$actionid}all_day_event" id="all_day_event" value="1" {if $event.all_day_event} checked="checked"{/if}/>
{assign var='s_date' value=$event.event_date_start_ut}{assign var='e_date' value=$event.event_date_end_ut}<br/>
<input type="checkbox" id="enddate_valid" name="{$actionid}enddate_valid" value="1" {if $s_date != $e_date && $e_date != 0}checked="checked"{/if}/>{$mod->Lang('use_to_date')}
</p>
</div>
<div id="enddate" class="pageoverflow" {if $s_date == $e_date || $e_date == 0}style="display: none;"{/if}>
<p class="pagetext">{$mod->Lang('cal_todate')}:</p>
<p class="pageinput">
{capture assign='tmp'}{$actionid}enddate_{/capture}
{html_select_date prefix=$tmp time=$event.event_date_end_ut start_year=$start_year end_year=$end_year}<span id="endtime"{if $event.all_day_event == 1} style="display: none;"{/if}> <span style="padding-right: 0.5em;">@</span> {html_select_time use_24_hours=$use24 time=$event.event_date_end_ut prefix=$tmp minute_interval=15 display_seconds=false}</span>
</p>
</div>
<div class="pageoverflow">
<p class="pagetext">*{$mod->Lang('cal_title')}:</p>
<p class="pageinput">{$event_title}</p>
</div>
{if isset($event_summary)}
<div class="pageoverflow">
<p class="pagetext">{$mod->Lang('cal_summary')}:</p>
<p class="pageinput">{$event_summary}</p>
</div>
{/if}
{if isset($event_details)}
<div class="pageoverflow">
<p class="pagetext">{$mod->Lang('cal_details')}:</p>
<p class="pageinput">{$event_details}</p>
</div>
{/if}
{if isset($fields)}
{foreach from=$fields item='one'}
<div class="pageoverflow">
<p class="pagetext">{$one->name}</p>
<p class="pageinput">{$one->field}</p>
</div>
{/foreach}
{/if}
</div>{* .grid_8 *}
<div class="grid_4">
{if isset($event.owner_name)}
<div class="pageoverflow">
<p class="pagetext">{$mod->Lang('owner')}:</p>
<p class="pageinput">{$event.owner_name}</p>
</div>
{/if}
{if isset($categories)}
<fieldset style="max-height: 20em; overflow-y: auto;">
<legend>{$mod->Lang('cal_categories')}:</legend>
<p class="pageinput">
{foreach from=$categories item='one'}
{$one->field} {$one->name}<br/>
{/foreach}
</p>
</fieldset>
{/if}
{if isset($allow_overlap)}
<div class="pageoverflow">
<p class="pagetext">{$mod->Lang('cal_overlap')}:</p>
<p class="pageinput">
<input type="hidden" name="{$actionid}event_allows_overlap" value="0"/>
<input type="checkbox" name="{$actionid}event_allows_overlap" value="1" checked="checked"/>
<br/>{$mod->Lang('cal_info_overlap')}
</p>
</div>
{/if}
<div id="recur_all" {if $event.event_recur_period != 'none' && $event.event_id > 0}style="display: none;"{/if}>
{if $event.event_parent_id <= 0}
<div class="pageoverflow">
<p class="pagetext">{$mod->Lang('cal_recur_period')}:</p>
{capture assign='tmp'}{$actionid}event_recur_period{/capture}
<p class="pageinput">
<select id="recurperiod" name="{$actionid}event_recur_period" onclick="handleDropdown();">
{foreach from=$recur_options key=key item=value}
<option value="{$value}" {if $value == $event_recur_period}selected="selected"{/if}>{$key}</option>
{/foreach}
</select>
</p>
</div>
<div id="recurdetails" {if $event.event_recur_period == 'none'}style="display: none;"{/if}>
<div class="pageoverflow">
<p class="pagetext">{$mod->Lang('cal_recur_details')}:</p>
<p class="pageinput">
{capture assign='tmp'}{$actionid}event_recur_interval{/capture}
{$mod->Lang('interval')}: {html_options name=$tmp selected=$event.event_recur_interval options=$nums} <span id="intervallabel">{$repeat_str}</span><br/>
</p>
</div>
<div class="pageoverflow" id="recur_weekly" {if $event.event_recur_period != 'weekly'}style="display: none;{/if}">
<p class="pagetext">{$mod->Lang('weekdays')}:</p>
<p class="pageinput">{$input_weekdays}</p>
</div>
<div class="pageoverflow" id="recur_monthly" {if $event.event_recur_period != 'monthly'}style="display: none;{/if}">
<p class="pagetext">{$mod->Lang('frequency')}:</p>
<p class="pageinput">
<select name="{$actionid}event_recur_monthdays[]" multiple="multiple" size="5">
{html_options options=$recur_days selected=$event.event_recur_monthdays}
</select>
</p>
</div>
<div class="pageoverflow">
<p class="pagetext">{$mod->Lang('cal_recur_until')}:</p>
{capture assign='tmp'}{$actionid}event_recur_date_{/capture}
{capture assign='tmp2'}{$actionid}event_recur_count{/capture}
<p class="pageinput">{html_select_date time=$event.event_date_recur_end_ut prefix=$tmp start_year=$start_year end_year=$end_year}
<br/>{$mod->Lang('max_recur_events')}: {html_options name=$tmp2 options=$maxiters selected=$event.event_recur_count}</p>
</div>
</div>{* recurdetails *}
</div>{* recur_all *}
{/if}
{if $event.event_id > 0 && $event.event_recur_period != 'none' && $event.event_parent_id == -1}
<div class="pageoverflow">
<p class="pagetext">{$mod->Lang('update_children')}:</p>
<p class="pageinput">
{capture assign='tmp'}{$actionid}update_children{/capture}
<input id="update_children" type="checkbox" name="{$tmp}" value="1"/>
</p>
</div>
{/if}
{if $event.event_id > 0 && $event.event_parent_id > 0}
<div class="pageoverflow">
<p class="pagetext">{$mod->Lang('prompt_removefromparent')}</p>
<p class="pageinput">
{cge_yesno_options prefix=$actionid name=removefromparent}
<br/>{$mod->Lang('info_removefromparent')}
</p>
</div>
{/if}
</div>{* .grid_4 *}
</div>{* c_full *}
{$formend}
File Manager Version 1.0, Coded By Lucas
Email: hehe@yahoo.com