]> code.citadel.org Git - citadel.git/blobdiff - webcit/event.c
recurrence editor
[citadel.git] / webcit / event.c
index 51c59c0871bc9f696ae24d7606847e5d7c9e601c..dcce662e2cf2b3774984dc25a87b46d2a526b6f2 100644 (file)
@@ -7,21 +7,6 @@
 #include "webcit.h"
 #include "webserver.h"
 
-
-
-
-       struct tm tm;
-       time_t thetime;
-       int i;
-
-
-
-
-
-
-
-
-
 /*
  * Display an event by itself (for editing)
  * supplied_vevent     the event to edit
@@ -462,29 +447,24 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum,
        wprintf("<input type=\"text\" name=\"interval\" maxlength=\"3\" size=\"3\" ");
        wprintf("value=\"%d\"> ", recur.interval);
 
-       wprintf("<select name=\"freq\" size=\"1\">\n");
+       wprintf("<select name=\"freq\" id=\"freq_selector\" size=\"1\" "
+               "onChange=\"RecurrenceShowHide();\">\n");
        for (i=0; i<(sizeof frequency_units / sizeof(char *)); ++i) {
-
-               /* We only want to offer daily, weekly, monthly, or yearly, which are
-                * options 3 through 6, but if one of the others hapens to be selected,
-                * we will grudgingly add it to the list of options.
-                */
-               if ( (i == recur.freq) || ((i>=3) && (i<=6)) ) {
-                       wprintf("<option %s value=\"%d\">%s</option>\n",
-                               ((i == recur.freq) ? "selected" : ""),
-                               i,
-                               frequency_units[i]
-                       );
-               }
+               wprintf("<option %s value=\"%d\">%s</option>\n",
+                       ((i == recur.freq) ? "selected" : ""),
+                       i,
+                       frequency_units[i]
+               );
        }
 
        wprintf("</td></tr>\n");
 
+
+       wprintf("<div id=\"weekday_selector\">\n");             /* begin 'weekday_selector' div */
        wprintf("<tr><td><b>");
        wprintf("%s", _("on these weekdays:"));
        wprintf("</b></td><td>");
 
-
        char weekday_is_selected[7];
        memset(weekday_is_selected, 0, 7);
 
@@ -508,6 +488,8 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum,
        }
 
        wprintf("</td></tr>\n");
+       wprintf("</div>\n");                            /* end 'weekday_selector' div */
+
        wprintf("</table>\n");
        wprintf("</div>\n");                            /* end 'rrule' div */