+ }
+
+ for (j=0; j<7; ++j) {
+ i = ((j + (int)weekstart) % 7);
+ wc_printf("<input type=\"checkbox\" name=\"weekday%d\" value=\"yes\"", i);
+ if (weekday_is_selected[i]) wc_printf(" checked='checked'");
+ wc_printf(">%s\n", weekday_labels[i]);
+ }
+ wc_printf("</div>\n"); /* end 'weekday_selector' div */
+
+
+
+
+
+ wc_printf("<div id=\"monthday_selector\">"); /* begin 'monthday_selector' div */
+
+ wc_printf("<input type=\"radio\" name=\"rrmonthtype\" id=\"rrmonthtype_mday\" "
+ "value=\"rrmonthtype_mday\" "
+ "%s onChange=\"RecurrenceShowHide();\">",
+ ((which_rrmonthtype_is_preselected == 0) ? "checked='checked'" : "")
+ );
+
+ rrmday = t_start.day;
+ rrmweekday = icaltime_day_of_week(t_start) - 1;
+
+ /* Figure out what week of the month we're in */
+ day1 = t_start;
+ day1.day = 1;
+ weekbase = icaltime_week_number(day1);
+ rrmweek = icaltime_week_number(t_start) - weekbase + 1;
+
+ /* Are we going by day of the month or week/day? */
+
+ if (recur.by_month_day[0] != ICAL_RECURRENCE_ARRAY_MAX) {
+ which_rrmonthtype_is_preselected = 0;
+ rrmday = recur.by_month_day[0];
+ }
+ else if (recur.by_day[0] != ICAL_RECURRENCE_ARRAY_MAX) {
+ which_rrmonthtype_is_preselected = 1;
+ rrmweek = icalrecurrencetype_day_position(recur.by_day[0]);
+ rrmweekday = icalrecurrencetype_day_day_of_week(recur.by_day[0]) - 1;
+ }
+
+ wc_printf(_("on day %s%d%s of the month"), "<span id=\"rrmday\">", rrmday, "</span>");
+ wc_printf("<br>\n");
+
+ wc_printf("<input type=\"radio\" name=\"rrmonthtype\" id=\"rrmonthtype_wday\" "
+ "value=\"rrmonthtype_wday\" "
+ "%s onChange=\"RecurrenceShowHide();\">",
+ ((which_rrmonthtype_is_preselected == 1) ? "checked='checked'" : "")
+ );
+
+ wc_printf(_("on the "));
+ wc_printf("<select name=\"rrmweek\" id=\"rrmweek\" size=\"1\" "
+ "onChange=\"RecurrenceShowHide();\">\n");
+ for (i=1; i<=5; ++i) {
+ wc_printf("<option %svalue=\"%d\">%s</option>\n",
+ ((i==rrmweek) ? "selected='selected' " : ""),
+ i,
+ ordinals[i]
+ );
+ }
+ wc_printf("</select> \n");
+
+ wc_printf("<select name=\"rrmweekday\" id=\"rrmweekday\" size=\"1\" "
+ "onChange=\"RecurrenceShowHide();\">\n");
+ for (j=0; j<7; ++j) {
+ i = ((j + (int)weekstart) % 7);
+ wc_printf("<option %svalue=\"%d\">%s</option>\n",
+ ((i==rrmweekday) ? "selected='selected' " : ""),
+ i,
+ weekday_labels[i]
+ );
+ }
+ wc_printf("</select>");
+
+ wc_printf(" %s<br>\n", _("of the month"));
+
+ wc_printf("</div>\n"); /* end 'monthday_selector' div */
+
+
+ rrymweek = rrmweek;
+ rrymweekday = rrmweekday;
+ rrymonth = t_start.month;
+ which_rryeartype_is_preselected = 0;
+
+ if (
+ (recur.by_day[0] != ICAL_RECURRENCE_ARRAY_MAX)
+ && (recur.by_day[0] != 0)
+ && (recur.by_month[0] != ICAL_RECURRENCE_ARRAY_MAX)
+ && (recur.by_month[0] != 0)
+ ) {
+ which_rryeartype_is_preselected = 1;
+ rrymweek = icalrecurrencetype_day_position(recur.by_day[0]);
+ rrymweekday = icalrecurrencetype_day_day_of_week(recur.by_day[0]) - 1;
+ rrymonth = recur.by_month[0];
+ }
+
+ wc_printf("<div id=\"yearday_selector\">"); /* begin 'yearday_selector' div */
+
+ wc_printf("<input type=\"radio\" name=\"rryeartype\" id=\"rryeartype_ymday\" "
+ "value=\"rryeartype_ymday\" "
+ "%s onChange=\"RecurrenceShowHide();\">",
+ ((which_rryeartype_is_preselected == 0) ? "checked='checked'" : "")
+ );
+ wc_printf(_("every "));
+ wc_printf("<span id=\"ymday\">%s</span><br>", _("year on this date"));
+
+ wc_printf("<input type=\"radio\" name=\"rryeartype\" id=\"rryeartype_ywday\" "
+ "value=\"rryeartype_ywday\" "
+ "%s onChange=\"RecurrenceShowHide();\">",
+ ((which_rryeartype_is_preselected == 1) ? "checked='checked'" : "")
+ );
+
+ wc_printf(_("on the "));
+ wc_printf("<select name=\"rrymweek\" id=\"rrymweek\" size=\"1\" "
+ "onChange=\"RecurrenceShowHide();\">\n");
+ for (i=1; i<=5; ++i) {
+ wc_printf("<option %svalue=\"%d\">%s</option>\n",
+ ((i==rrymweek) ? "selected='selected' " : ""),
+ i,
+ ordinals[i]
+ );
+ }
+ wc_printf("</select> \n");
+
+ wc_printf("<select name=\"rrymweekday\" id=\"rrymweekday\" size=\"1\" "
+ "onChange=\"RecurrenceShowHide();\">\n");
+ for (j=0; j<7; ++j) {
+ i = ((j + (int)weekstart) % 7);
+ wc_printf("<option %svalue=\"%d\">%s</option>\n",
+ ((i==rrymweekday) ? "selected='selected' " : ""),
+ i,
+ weekday_labels[i]
+ );
+ }
+ wc_printf("</select>");
+
+ wc_printf(" %s ", _("of"));
+
+ wc_printf("<select name=\"rrymonth\" id=\"rrymonth\" size=\"1\" "
+ "onChange=\"RecurrenceShowHide();\">\n");
+ for (i=1; i<=12; ++i) {
+ wc_printf("<option %svalue=\"%d\">%s</option>\n",
+ ((i==rrymonth) ? "selected='selected' " : ""),
+ i,
+ month_labels[i-1]
+ );
+ }
+ wc_printf("</select>");
+ wc_printf("<br>\n");
+
+ wc_printf("</div>\n"); /* end 'yearday_selector' div */
+
+ wc_printf("</td></tr>\n");