]> code.citadel.org Git - citadel.git/commitdiff
* Completed "me as organizer" -- the user's own e-mail address is inserted
authorArt Cancro <ajc@citadel.org>
Fri, 29 Nov 2002 23:56:19 +0000 (23:56 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 29 Nov 2002 23:56:19 +0000 (23:56 +0000)
  as the organizer of new events.  Detect when the user is the organizer and
  enable/disable the attendees box accordingly.

webcit/ChangeLog
webcit/event.c

index dc70f01c899ffcf7587169891419cb382f4da230..5a997ad5d06ece0bb8dcf186a4bc1b35d3c1ce14 100644 (file)
@@ -1,4 +1,9 @@
 $Log$
+Revision 400.58  2002/11/29 23:56:19  ajc
+* Completed "me as organizer" -- the user's own e-mail address is inserted
+  as the organizer of new events.  Detect when the user is the organizer and
+  enable/disable the attendees box accordingly.
+
 Revision 400.57  2002/11/29 16:38:37  ajc
 * Started some "me as organizer" stuff.  (BROKEN BUILD ... I'll fix soon.)
 
@@ -1145,4 +1150,3 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
-
index 9959412c0cf18671af30b32f70d36ae78b442966..990a06b2f2884bee6ecab604cced6966166846bb 100644 (file)
@@ -39,7 +39,6 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum)
        struct icaltimetype t_start, t_end;
        time_t now;
        int created_new_vevent = 0;
-       icalorganizertype me_as_organizer;
        icalproperty *organizer = NULL;
        char organizer_string[SIZ];
        icalproperty *attendee = NULL;
@@ -215,9 +214,9 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum)
        if (icalcomponent_get_first_property(vevent, ICAL_ORGANIZER_PROPERTY)
           == NULL) {
                sprintf(organizer_string, "MAILTO:%s", WC->cs_inet_email);
-               memset(&me_as_organizer, 0, sizeof(icalorganizertype));
-               me_as_organizer.value = strdup(organizer_string);
-               icalcomponent_set_organizer(vevent, me_as_organizer);
+               icalcomponent_add_property(vevent,
+                       icalproperty_new_organizer(organizer_string)
+               );
        }
 
        /* Determine who is the organizer of this event.  This is useless
@@ -237,10 +236,11 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum)
                        }
                }
        }
-       wprintf("<TR><TD>Organizer<BR>(FIXME)</TD><TD>");
+       wprintf("<TR><TD><B>Organizer</B></TD><TD>");
        escputs(organizer_string);
        if (organizer_is_me) {
-               wprintf("(you. FIXME)\n");
+               wprintf(" <FONT SIZE=-1><I>"
+                       "(you are the organizer)</I></FONT>\n");
        }
        wprintf("</TD></TR>\n");
 
@@ -248,8 +248,10 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum)
        wprintf("<TR><TD><B>Attendes</B><BR>"
                "<FONT SIZE=-2>(Separate multiple attendees with commas)"
                "</FONT></TD><TD>"
-               "<TEXTAREA NAME=\"attendees\" wrap=soft "
-               "ROWS=3 COLS=80 WIDTH=80>\n");
+               "<TEXTAREA %s NAME=\"attendees\" wrap=soft "
+               "ROWS=3 COLS=80 WIDTH=80>\n",
+               (organizer_is_me ? "" : "DISABLED ")
+       );
        i = 0;
        for (attendee = icalcomponent_get_first_property(vevent, ICAL_ATTENDEE_PROPERTY); attendee != NULL; attendee = icalcomponent_get_next_property(vevent, ICAL_ATTENDEE_PROPERTY)) {
                strcpy(attendee_string, icalproperty_get_attendee(attendee));