<? global $vis_language; ?>
<div id="vis_client_list"><div class="vis_main_window vis_shadow vis_round_corner"><table cellpadding="0" cellspacing="0" width="100%"><tr><td>
    <div class="vis_main_header"><? echo $vis_language['TXTADDTASK']; ?></div></td><td align="right"></td></tr></table>
    <div class="vis_main_window_content vis_round_corner"><div id="vis_calendar_area">
        <form name="vis_add_task_form" id="vis_add_task_form"><table border="0" cellpadding="3" cellspacing="3" width="100%">
            <tr><td width="150"><? echo $vis_language['TXTTITLE']; ?></td><td><input name="vis_title" id="vis_title" type="text" class="vis_input" /></td></tr>
            <tr><td><? echo $vis_language['TXTDESCRIPTION']; ?> </td><td><textarea name="vis_details" id="vis_details" class="vis_input"></textarea></td></tr>
            <tr><td><? echo $vis_language['TXTSTARTDATE']; ?></td><td><input name="vis_from_dt" id="vis_cal_from_dt" value="<? echo $date; ?>" /></td></tr>
            <tr><td><? echo $vis_language['TXTENDDATE']; ?></td><td><input name="vis_to_dt" id="vis_cal_to_dt" value="<? echo $date; ?>" /></td></tr>
            <tr><td><? echo $vis_language['TXTACCESS']; ?></td><td><input name="vis_type" id="vis_type_pub" value="0" checked="checked" type="radio"><label for="vis_type_pub"><? echo $vis_language['TXTPUBLIC']; ?></label> <input name="vis_type" id="vis_type_pri" value="1" type="radio"><label for="vis_type_pri"><? echo $vis_language['TXTPRIVATE']; ?></label></td></tr>
            <tr><td><? echo $vis_language['TXTSTATUS']; ?></td><td><select name="vis_status" id="vis_status" class="vis_input">
                <option value="None"><? echo $vis_language['TXTNONE']; ?></option><option value="Not started"><? echo $vis_language['TXTNOTSTARTED']; ?></option><option value="In progress"><? echo $vis_language['TXTINPROGRESS']; ?></option><option value="Completed"><? echo $vis_language['TXTCOMPLETED']; ?></option><option value="Planned"><? echo $vis_language['TXTPLANNED']; ?></option>
            </select></td></tr>
            <tr><td><? echo $vis_language['TXTPRIORITY']; ?></td><td><select name="vis_priority" id="vis_priority" class="vis_input">
                <option value="Low"><? echo $vis_language['TXTLOW']; ?></option><option value="Medium"><? echo $vis_language['TXTMEDIUM']; ?></option><option value="High"><? echo $vis_language['TXTHIGH']; ?></option></select></td></tr>
            <tr><td><? echo $vis_language['TXTLABEL']; ?></td><td><select name="vis_label" id="vis_label" class="vis_input">
                <option value="None"><? echo $vis_language['TXTNONE']; ?></option><option value="Important"><? echo $vis_language['TXTIMPORTANT']; ?></option><option value="Business"><? echo $vis_language['TXTBUSINESS']; ?></option><option value="Personal"><? echo $vis_language['TXTPERSONAL']; ?></option></select></td></tr>
            <tr><td><? echo $vis_language['TXTLOCATION']; ?></td><td><input name="vis_location" id="vis_location" class="vis_input" type="text" /></td></tr>
            <tr><td colspan="2"><div class="vis_seperator_horizontal"></div></td></tr>
            <tr><td colspan="2"><span class="vis_button" onclick="$('#vis_global_msg_div').visExecution('submit_form', {'vis_module':'home', 'vis_operation':'save_cal_task', 'vis_form':'vis_add_task_form'})"><? echo $vis_language['TXTADD']; ?></span></td></tr>
        </table></form>
    </div>
</div>
<script>
    var dates=$( "#vis_cal_from_dt, #vis_cal_to_dt" ).datepicker({
        numberOfMonths: 2,
        dateFormat: 'yy-mm-dd',
        onSelect: function( selectedDate ) {
            var option=this.id=="vis_cal_from_dt"?"minDate":"maxDate",
                instance=$( this ).data( "datepicker" ),
                date=$.datepicker.parseDate ( instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings );
            dates.not(this).datepicker("option", option, date);
        }
    });
</script>