]> code.citadel.org Git - citadel.git/blobdiff - webcit/event.c
More recurrence editor code
[citadel.git] / webcit / event.c
index 6034e7087a20301913f0f6fbe12dea9140465d08..86014aaba470df76b5b7b3eb9e7dfe5056d2ebab 100644 (file)
@@ -191,7 +191,7 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum,
                t_start.is_utc = 1;
 
        }
-       display_icaltimetype_as_webform(&t_start, "dtstart");
+       display_icaltimetype_as_webform(&t_start, "dtstart", 0);
 
        wprintf("<INPUT TYPE=\"checkbox\" id=\"alldayevent\" NAME=\"alldayevent\" "
                "VALUE=\"yes\" onclick=\"eventEditAllDay();\""
@@ -232,7 +232,7 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum,
                        /* t_end = icaltime_from_timet(now, 0); */
                }
        }
-       display_icaltimetype_as_webform(&t_end, "dtend");
+       display_icaltimetype_as_webform(&t_end, "dtend", 0);
        wprintf("</TD></TR>\n");
 
        wprintf("<TR><TD><B>");
@@ -438,11 +438,14 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum,
                _("never")
        };
 
+
+
+
        wprintf("<tr><td><b>");
-       wprintf(_("Repeats"));
+       wprintf(_("Recurrence rule"));
        wprintf("</b></td><td>");
        if ((recur.freq < 0) || (recur.freq > 6)) recur.freq = 4;
-       wprintf("%s ", _("every"));
+       wprintf("%s ", _("Repeats every"));
 
        wprintf("<input type=\"text\" name=\"interval\" maxlength=\"3\" size=\"3\" ");
        wprintf("value=\"%d\"> ", recur.interval);
@@ -487,6 +490,45 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum,
 
        wprintf("</td></tr>\n");
 
+
+
+       // FIXME preselect the correct radio button
+
+       wprintf("<tr><td><b>");
+       wprintf(_("Recurrence range"));
+       wprintf("</b></td><td>\n");
+
+       wprintf("<input type=\"radio\" name=\"rrend\" id=\"rrend_none\" "
+               "%s onChange=\"RecurrenceShowHide();\">",
+               (1 ? "checked" : "")
+       );
+       wprintf("%s</input><br />\n", _("No ending date"));
+
+       wprintf("<input type=\"radio\" name=\"rrend\" id=\"rrend_count\" "
+               "%s onChange=\"RecurrenceShowHide();\">",
+               (0 ? "checked" : "")
+       );
+       wprintf(_("Repeat this event"));
+       wprintf("</input> ");
+       wprintf("<input type=\"text\" name=\"rrcount\" id=\"rrcount\" maxlength=\"3\" size=\"3\" ");
+       wprintf("value=\"%d\"> ", recur.count);
+       wprintf(_("times"));
+       wprintf("<br />\n");
+
+       wprintf("<input type=\"radio\" name=\"rrend\" id=\"rrend_until\" "
+               "%s onChange=\"RecurrenceShowHide();\">",
+               (0 ? "checked" : "")
+       );
+       wprintf(_("Repeat this event until "));
+       wprintf("</input>");
+       display_icaltimetype_as_webform(&recur.until, "rruntil", 1);
+       wprintf("<br />\n");
+
+       wprintf("</td></tr>\n");
+
+
+
+
        wprintf("</table>\n");
        wprintf("</div>\n");                            /* end 'rrule' div */