commit b660338
default
·
2023-11-22 13:23:14 +0000 UTC
parent 258850f
More work in dm_textarea towards a generic html_note().
1 files changed,
+19,
-9
M
html.c
M
html.c
+19,
-9
1@@ -1799,9 +1799,9 @@ xs_str *html_people_list(snac *snac, xs_str *os, xs_list *list, const char *head
2 L("Block any activity from this user")));
3
4 /* the post textarea */
5- xs *dm_form_id = xs_fmt("%s_%s_dm", md5, t);
6- xs *dm_action = xs_fmt("%s/admin/note", snac->actor);
7- xs *dm_form_id2 = xs_fmt("%s_reply_form", md5);
8+ xs *dm_div_id = xs_fmt("%s_%s_dm", md5, t);
9+ xs *dm_action = xs_fmt("%s/admin/note", snac->actor);
10+ xs *dm_form_id = xs_fmt("%s_reply_form", md5);
11
12 xs_html *dm_textarea = xs_html_tag("div",
13 xs_html_tag("details",
14@@ -1810,27 +1810,37 @@ xs_str *html_people_list(snac *snac, xs_str *os, xs_list *list, const char *head
15 xs_html_sctag("p", NULL),
16 xs_html_tag("div",
17 xs_html_attr("class", "snac-note"),
18- xs_html_attr("id", dm_form_id),
19+ xs_html_attr("id", dm_div_id),
20 xs_html_tag("form",
21 xs_html_attr("autocomplete", "off"),
22 xs_html_attr("method", "post"),
23 xs_html_attr("action", dm_action),
24 xs_html_attr("enctype", "multipart/form-data"),
25- xs_html_attr("id", dm_form_id2),
26+ xs_html_attr("id", dm_form_id),
27 xs_html_tag("textarea",
28 xs_html_attr("class", "snac-textarea"),
29 xs_html_attr("name", "content"),
30 xs_html_attr("rows", "4"),
31 xs_html_attr("wrap", "virtual"),
32- xs_html_attr("required", "required")),
33+ xs_html_attr("required", "required"),
34+ xs_html_attr("placeholder", ""),
35+ xs_html_text("")),
36 xs_html_sctag("input",
37 xs_html_attr("type", "hidden"),
38 xs_html_attr("name", "to"),
39 xs_html_attr("value", actor_id)),
40 xs_html_sctag("p", NULL),
41- xs_html_sctag("input",
42- xs_html_attr("type", "file"),
43- xs_html_attr("name", "attach")),
44+ xs_html_tag("details",
45+ xs_html_tag("summary",
46+ xs_html_text(L("Attachment..."))),
47+ xs_html_sctag("p", NULL),
48+ xs_html_sctag("input",
49+ xs_html_attr("type", "file"),
50+ xs_html_attr("name", "attach")),
51+ xs_html_sctag("input",
52+ xs_html_attr("type", "text"),
53+ xs_html_attr("name", "alt_text"),
54+ xs_html_attr("placeholder", L("Attachment description")))),
55 xs_html_sctag("p", NULL),
56 xs_html_sctag("input",
57 xs_html_attr("type", "submit"),