$Log$
+Revision 400.60 2002/11/30 21:34:51 ajc
+* Submit organizer in a hidden field, in case the server needs it
+
Revision 400.59 2002/11/30 04:46:46 ajc
* First cut at adding/removing attendees to an event
(Actual invitations should be sent by the Citadel server)
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
-
wprintf(" <FONT SIZE=-1><I>"
"(you are the organizer)</I></FONT>\n");
}
+
+ /*
+ * Transmit the organizer as a hidden field. We don't want the user
+ * to be able to change it, but we do want it fed back to the server,
+ * especially if this is a new event and there is no organizer already
+ * in the calendar object.
+ */
+ wprintf("<INPUT TYPE=\"hidden\" NAME=\"organizer\" VALUE=\"");
+ escputs(organizer_string);
+ wprintf("\">");
+
wprintf("</TD></TR>\n");
/* Attendees (do more with this later) */
int i;
int foundit;
char form_attendees[SIZ];
+ char organizer_string[SIZ];
if (supplied_vevent != NULL) {
vevent = supplied_vevent;
);
}
+ /* Set the organizer, only if one does not already exist *and*
+ * the form is supplying one
+ */
+ strcpy(buf, bstr("organizer"));
+ if ( (icalcomponent_get_first_property(vevent,
+ ICAL_ORGANIZER_PROPERTY) == NULL)
+ && (strlen(buf) > 0) ) {
+
+ /* set new organizer */
+ sprintf(organizer_string, "MAILTO:%s", buf);
+ icalcomponent_add_property(vevent,
+ icalproperty_new_organizer(organizer_string)
+ );
+
+ }
+
/*
* Add any new attendees listed in the web form
*/