commit cbe25dd

default  ·  2025-04-10 06:40:54 +0000 UTC
parent 32b7fa2
Hide the scheduled post date and time behind a 'details'.
1 files changed,  +16, -12
M html.c
M html.c
+16, -12
 1@@ -457,18 +457,22 @@ xs_html *html_note(snac *user, const char *summary,
 2     if (edit_id == NULL || is_draft || is_scheduled(user, edit_id)) {
 3         xs_html_add(form,
 4             xs_html_tag("p",
 5-                xs_html_text(L("Post date and time (empty, right now; in the future, schedule for later):")),
 6-                xs_html_sctag("br", NULL),
 7-                xs_html_sctag("input",
 8-                    xs_html_attr("type",  "date"),
 9-                    xs_html_attr("value", post_date ? post_date : ""),
10-                    xs_html_attr("name",  "post_date")),
11-                xs_html_text(" "),
12-                xs_html_sctag("input",
13-                    xs_html_attr("type",  "time"),
14-                    xs_html_attr("value", post_time ? post_time : ""),
15-                    xs_html_attr("step",  "1"),
16-                    xs_html_attr("name",  "post_time"))));
17+                xs_html_tag("details",
18+                    xs_html_tag("summary",
19+                        xs_html_text(L("Scheduled post..."))),
20+                    xs_html_tag("p",
21+                        xs_html_text(L("Post date and time:")),
22+                        xs_html_sctag("br", NULL),
23+                        xs_html_sctag("input",
24+                            xs_html_attr("type",  "date"),
25+                            xs_html_attr("value", post_date ? post_date : ""),
26+                            xs_html_attr("name",  "post_date")),
27+                        xs_html_text(" "),
28+                        xs_html_sctag("input",
29+                            xs_html_attr("type",  "time"),
30+                            xs_html_attr("value", post_time ? post_time : ""),
31+                            xs_html_attr("step",  "1"),
32+                            xs_html_attr("name",  "post_time"))))));
33     }
34 
35     if (edit_id)