summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2023-11-22 14:23:14 +0100
committerGravatar default2023-11-22 14:23:14 +0100
commitb6603380b49709ef8f738ae3c5274a4bcb099dde (patch)
tree00331df1ea29f9570947c25930ed4d13670410fe
parentBackport from xs. (diff)
downloadsnac2-b6603380b49709ef8f738ae3c5274a4bcb099dde.tar.gz
snac2-b6603380b49709ef8f738ae3c5274a4bcb099dde.tar.xz
snac2-b6603380b49709ef8f738ae3c5274a4bcb099dde.zip
More work in dm_textarea towards a generic html_note().
-rw-r--r--html.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/html.c b/html.c
index 2c807ef..541e920 100644
--- a/html.c
+++ b/html.c
@@ -1799,9 +1799,9 @@ xs_str *html_people_list(snac *snac, xs_str *os, xs_list *list, const char *head
1799 L("Block any activity from this user"))); 1799 L("Block any activity from this user")));
1800 1800
1801 /* the post textarea */ 1801 /* the post textarea */
1802 xs *dm_form_id = xs_fmt("%s_%s_dm", md5, t); 1802 xs *dm_div_id = xs_fmt("%s_%s_dm", md5, t);
1803 xs *dm_action = xs_fmt("%s/admin/note", snac->actor); 1803 xs *dm_action = xs_fmt("%s/admin/note", snac->actor);
1804 xs *dm_form_id2 = xs_fmt("%s_reply_form", md5); 1804 xs *dm_form_id = xs_fmt("%s_reply_form", md5);
1805 1805
1806 xs_html *dm_textarea = xs_html_tag("div", 1806 xs_html *dm_textarea = xs_html_tag("div",
1807 xs_html_tag("details", 1807 xs_html_tag("details",
@@ -1810,27 +1810,37 @@ xs_str *html_people_list(snac *snac, xs_str *os, xs_list *list, const char *head
1810 xs_html_sctag("p", NULL), 1810 xs_html_sctag("p", NULL),
1811 xs_html_tag("div", 1811 xs_html_tag("div",
1812 xs_html_attr("class", "snac-note"), 1812 xs_html_attr("class", "snac-note"),
1813 xs_html_attr("id", dm_form_id), 1813 xs_html_attr("id", dm_div_id),
1814 xs_html_tag("form", 1814 xs_html_tag("form",
1815 xs_html_attr("autocomplete", "off"), 1815 xs_html_attr("autocomplete", "off"),
1816 xs_html_attr("method", "post"), 1816 xs_html_attr("method", "post"),
1817 xs_html_attr("action", dm_action), 1817 xs_html_attr("action", dm_action),
1818 xs_html_attr("enctype", "multipart/form-data"), 1818 xs_html_attr("enctype", "multipart/form-data"),
1819 xs_html_attr("id", dm_form_id2), 1819 xs_html_attr("id", dm_form_id),
1820 xs_html_tag("textarea", 1820 xs_html_tag("textarea",
1821 xs_html_attr("class", "snac-textarea"), 1821 xs_html_attr("class", "snac-textarea"),
1822 xs_html_attr("name", "content"), 1822 xs_html_attr("name", "content"),
1823 xs_html_attr("rows", "4"), 1823 xs_html_attr("rows", "4"),
1824 xs_html_attr("wrap", "virtual"), 1824 xs_html_attr("wrap", "virtual"),
1825 xs_html_attr("required", "required")), 1825 xs_html_attr("required", "required"),
1826 xs_html_attr("placeholder", ""),
1827 xs_html_text("")),
1826 xs_html_sctag("input", 1828 xs_html_sctag("input",
1827 xs_html_attr("type", "hidden"), 1829 xs_html_attr("type", "hidden"),
1828 xs_html_attr("name", "to"), 1830 xs_html_attr("name", "to"),
1829 xs_html_attr("value", actor_id)), 1831 xs_html_attr("value", actor_id)),
1830 xs_html_sctag("p", NULL), 1832 xs_html_sctag("p", NULL),
1831 xs_html_sctag("input", 1833 xs_html_tag("details",
1832 xs_html_attr("type", "file"), 1834 xs_html_tag("summary",
1833 xs_html_attr("name", "attach")), 1835 xs_html_text(L("Attachment..."))),
1836 xs_html_sctag("p", NULL),
1837 xs_html_sctag("input",
1838 xs_html_attr("type", "file"),
1839 xs_html_attr("name", "attach")),
1840 xs_html_sctag("input",
1841 xs_html_attr("type", "text"),
1842 xs_html_attr("name", "alt_text"),
1843 xs_html_attr("placeholder", L("Attachment description")))),
1834 xs_html_sctag("p", NULL), 1844 xs_html_sctag("p", NULL),
1835 xs_html_sctag("input", 1845 xs_html_sctag("input",
1836 xs_html_attr("type", "submit"), 1846 xs_html_attr("type", "submit"),