X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fcalendar_tools.c;h=3e946d945fdcc7ea23dae04d835292e9031e1439;hb=cb88dc45bd418f3426f3ad47c63e2bcdcf6209d6;hp=1a9f9c99a080fdd841f2b432fb8fbb6b89bb5d44;hpb=344d7a7ba9543b03b975fc822bf98aed1d2e8a63;p=citadel.git diff --git a/webcit/calendar_tools.c b/webcit/calendar_tools.c index 1a9f9c99a..3e946d945 100644 --- a/webcit/calendar_tools.c +++ b/webcit/calendar_tools.c @@ -33,7 +33,7 @@ char *hourname[] = { * might be to allow the user to specify his/her timezone. */ -void display_icaltimetype_as_webform(struct icaltimetype *t, char *prefix) { +void display_icaltimetype_as_webform(struct icaltimetype *t, char *prefix, int date_only) { int i; time_t now; struct tm tm_now; @@ -73,6 +73,14 @@ void display_icaltimetype_as_webform(struct icaltimetype *t, char *prefix) { wprintf(prefix); wprintf("', '%s');\n", get_selected_language()); wprintf(""); + + /* If we're editing a date only, we still generate the time boxes, but we hide them. + * This keeps the data model consistent. + */ + if (date_only) { + wprintf("
"); + } + wprintf(_("Hour: ")); wprintf("\n"); + + if (date_only) { + wprintf("
"); + } } /*