I also noticed that the datepicker.js seems to have been discontinued
by its author. Due to this plus some shortcomings we may want to
consider forking it and integrating it more tightly into the WebCit
framework.
wprintf(prefix);
wprintf("\" id=\"");
wprintf(prefix);
wprintf(prefix);
wprintf("\" id=\"");
wprintf(prefix);
- wprintf("\" value=\"");
+ wprintf("\" size=\"10\" maxlength=\"10\" value=\"");
wc_strftime(timebuf, 32, "%Y-%m-%d", &tm);
wprintf(timebuf);
wprintf("\">");
wc_strftime(timebuf, 32, "%Y-%m-%d", &tm);
wprintf(timebuf);
wprintf("\">");
/* blank recurrence with some sensible defaults */
memset(&recur, 0, sizeof(struct icalrecurrencetype));
recur.count = 3;
/* blank recurrence with some sensible defaults */
memset(&recur, 0, sizeof(struct icalrecurrencetype));
recur.count = 3;
+ recur.until = icaltime_null_time();
recur.interval = 1;
recur.freq = ICAL_WEEKLY_RECURRENCE;
}
recur.interval = 1;
recur.freq = ICAL_WEEKLY_RECURRENCE;
}
-
- // FIXME preselect the correct radio button
+ int which_rrend_is_preselected = 0;
+ if (!icaltime_is_null_time(recur.until)) which_rrend_is_preselected = 2;
+ if (recur.count > 0) which_rrend_is_preselected = 1;
wprintf("<tr><td><b>");
wprintf(_("Recurrence range"));
wprintf("<tr><td><b>");
wprintf(_("Recurrence range"));
wprintf("<input type=\"radio\" name=\"rrend\" id=\"rrend_none\" "
"%s onChange=\"RecurrenceShowHide();\">",
wprintf("<input type=\"radio\" name=\"rrend\" id=\"rrend_none\" "
"%s onChange=\"RecurrenceShowHide();\">",
+ ((which_rrend_is_preselected == 0) ? "checked" : "")
);
wprintf("%s</input><br />\n", _("No ending date"));
wprintf("<input type=\"radio\" name=\"rrend\" id=\"rrend_count\" "
"%s onChange=\"RecurrenceShowHide();\">",
);
wprintf("%s</input><br />\n", _("No ending date"));
wprintf("<input type=\"radio\" name=\"rrend\" id=\"rrend_count\" "
"%s onChange=\"RecurrenceShowHide();\">",
+ ((which_rrend_is_preselected == 1) ? "checked" : "")
);
wprintf(_("Repeat this event"));
wprintf("</input> ");
);
wprintf(_("Repeat this event"));
wprintf("</input> ");
wprintf("<input type=\"radio\" name=\"rrend\" id=\"rrend_until\" "
"%s onChange=\"RecurrenceShowHide();\">",
wprintf("<input type=\"radio\" name=\"rrend\" id=\"rrend_until\" "
"%s onChange=\"RecurrenceShowHide();\">",
+ ((which_rrend_is_preselected == 2) ? "checked" : "")
);
wprintf(_("Repeat this event until "));
wprintf("</input>");
);
wprintf(_("Repeat this event until "));
wprintf("</input>");