diff options
author | default <nobody@localhost> | 2022-11-13 15:06:54 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2022-11-13 15:06:54 +0100 |
commit | eef7bc8fde98ca6ed83c09f5fb37de7d26e2e835 (patch) | |
tree | 0fdcfb6fa7072b6a6e173b91716d740317f6376e | |
parent | 52a1da71fe7598d07e6617c2609d68a84d13de1c (diff) |
Use details/summary HTML tags instead of JS for the 'Reply' button.
-rw-r--r-- | html.c | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -393,13 +393,7 @@ d_char *html_entry_controls(snac *snac, d_char *os, char *msg, int num) "<input type=\"hidden\" name=\"id\" value=\"%s\">\n" "<input type=\"hidden\" name=\"actor\" value=\"%s\">\n" "<input type=\"hidden\" name=\"redir\" value=\"%d_entry\">\n" - "<input type=\"button\" name=\"action\" " - "value=\"%s\" onclick=\"" - "x = document.getElementById('%s_reply'); " - "if (x.style.display == 'block') " - " x.style.display = 'none'; else " - " x.style.display = 'block';" - "\">\n", + "\n", snac->actor, id, actor, num, L("Reply"), @@ -447,7 +441,8 @@ d_char *html_entry_controls(snac *snac, d_char *os, char *msg, int num) xs *ct = build_mentions(snac, msg); xs *s1 = xs_fmt( - "<p><div class=\"snac-note\" style=\"display: none\" id=\"%s_reply\">\n" + "<p><details><summary>%s</summary>\n" + "<div class=\"snac-note\" id=\"%s_reply\">\n" "<form method=\"post\" action=\"%s/admin/note\" " "enctype=\"multipart/form-data\" id=\"%s_reply_form\">\n" "<textarea class=\"snac-textarea\" name=\"content\" " @@ -455,8 +450,11 @@ d_char *html_entry_controls(snac *snac, d_char *os, char *msg, int num) "<input type=\"hidden\" name=\"in_reply_to\" value=\"%s\">\n" "<p><input type=\"file\" name=\"attach\">\n" "<p><input type=\"submit\" class=\"button\" value=\"%s\">\n" - "</form><p></div>\n", + "</form><p></div>\n" + "</details><p>" + "\n", + L("Reply"), md5, snac->actor, md5, ct, |