}
void display_calendar(long msgnum) {
- wprintf("<i>Cannot display calendar item</i><br>\n");
+ wprintf("<i>"
+ "Cannot display calendar item. You are seeing this error "
+ "because your WebCit service has not been installed with "
+ "calendar support. Please contact your system administrator."
+ "</i><br>\n");
}
void display_task(long msgnum) {
- wprintf("<i>Cannot display item from task list</i><br>\n");
+ wprintf("<i>"
+ "Cannot display to-do item. You are seeing this error "
+ "because your WebCit service has not been installed with "
+ "calendar support. Please contact your system administrator."
+ "</i><br>\n");
}
#else /* HAVE_ICAL_H */
/****** End of handler stubs. Everything below this line is real. ******/
+
+
/*
* Process a single calendar component.
* It won't be a compound component at this point because those have
"</FONT></TD></TR></TABLE><BR>\n"
);
+ wprintf("UID == ");
+ p = icalcomponent_get_first_property(vevent, ICAL_UID_PROPERTY);
+ if (p != NULL) {
+ escputs((char *)icalproperty_get_comment(p));
+ }
+ wprintf(" (FIXME remove this when done)<BR>\n");
+
wprintf("<FORM METHOD=\"POST\" ACTION=\"/save_event\">\n");
wprintf("<INPUT TYPE=\"hidden\" NAME=\"msgnum\" VALUE=\"%ld\">\n",
msgnum);
wprintf("<INPUT TYPE=\"hidden\" NAME=\"day\" VALUE=\"%s\">\n",
bstr("day"));
-
/* Put it in a borderless table so it lines up nicely */
wprintf("<TABLE border=0 width=100%%>\n");
}
wprintf("\"></TD></TR>\n");
+ wprintf("<TR><TD><B>Location</B></TD><TD>\n"
+ "<INPUT TYPE=\"text\" NAME=\"location\" "
+ "MAXLENGTH=\"64\" SIZE=\"64\" VALUE=\"");
+ p = icalcomponent_get_first_property(vevent, ICAL_LOCATION_PROPERTY);
+ if (p != NULL) {
+ escputs((char *)icalproperty_get_comment(p));
+ }
+ wprintf("\"></TD></TR>\n");
+
wprintf("<TR><TD><B>Start</B></TD><TD>\n");
p = icalcomponent_get_first_property(vevent, ICAL_DTSTART_PROPERTY);
if (p != NULL) {
icalcomponent_add_property(vevent,
icalproperty_new_summary(bstr("summary")));
+ while (prop = icalcomponent_get_first_property(vevent,
+ ICAL_LOCATION_PROPERTY), prop != NULL) {
+ icalcomponent_remove_property(vevent, prop);
+ }
+ icalcomponent_add_property(vevent,
+ icalproperty_new_location(bstr("location")));
+
while (prop = icalcomponent_get_first_property(vevent,
ICAL_DESCRIPTION_PROPERTY), prop != NULL) {
icalcomponent_remove_property(vevent, prop);
icaltime_from_webform("due")
)
);
+
+ /* Give this event a UID if it doesn't have one. */
+ if (icalcomponent_get_first_property(vevent,
+ ICAL_UID_PROPERTY) == NULL) {
+ generate_new_uid(buf);
+ icalcomponent_add_property(vevent,
+ icalproperty_new_uid(buf)
+ );
+ }
/* Serialize it and save it to the message base */
serv_puts("ENT0 1|||4");