summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/html.c b/html.c
index c9d6edd..b412f41 100644
--- a/html.c
+++ b/html.c
@@ -387,7 +387,8 @@ d_char *html_top_controls(snac *snac, d_char *s)
387 "<textarea class=\"snac-textarea\" name=\"content\" " 387 "<textarea class=\"snac-textarea\" name=\"content\" "
388 "rows=\"8\" wrap=\"virtual\" required=\"required\"></textarea>\n" 388 "rows=\"8\" wrap=\"virtual\" required=\"required\"></textarea>\n"
389 "<input type=\"hidden\" name=\"in_reply_to\" value=\"\">\n" 389 "<input type=\"hidden\" name=\"in_reply_to\" value=\"\">\n"
390 "<p>%s: <input type=\"checkbox\" name=\"sensitive\">\n" 390 "<p>%s: <input type=\"checkbox\" name=\"sensitive\"> "
391 "<input type=\"text\" name=\"summary\" placeholder=\"%s\">\n"
391 "<p>%s: <input type=\"checkbox\" name=\"mentioned_only\">\n" 392 "<p>%s: <input type=\"checkbox\" name=\"mentioned_only\">\n"
392 393
393 "<details><summary>%s</summary>\n" /** attach **/ 394 "<details><summary>%s</summary>\n" /** attach **/
@@ -512,6 +513,7 @@ d_char *html_top_controls(snac *snac, d_char *s)
512 xs *s1 = xs_fmt(_tmpl, 513 xs *s1 = xs_fmt(_tmpl,
513 snac->actor, 514 snac->actor,
514 L("Sensitive content"), 515 L("Sensitive content"),
516 L("Sensitive content description"),
515 L("Only for mentioned people"), 517 L("Only for mentioned people"),
516 518
517 L("Attach..."), 519 L("Attach..."),
@@ -697,7 +699,8 @@ xs_str *html_entry_controls(snac *snac, xs_str *os, const xs_dict *msg, const ch
697 "rows=\"4\" wrap=\"virtual\" required=\"required\">%s</textarea>\n" 699 "rows=\"4\" wrap=\"virtual\" required=\"required\">%s</textarea>\n"
698 "<input type=\"hidden\" name=\"edit_id\" value=\"%s\">\n" 700 "<input type=\"hidden\" name=\"edit_id\" value=\"%s\">\n"
699 701
700 "<p>%s: <input type=\"checkbox\" name=\"sensitive\">\n" 702 "<p>%s: <input type=\"checkbox\" name=\"sensitive\"> "
703 "<input type=\"text\" name=\"summary\" placeholder=\"%s\">\n"
701 "<p>%s: <input type=\"checkbox\" name=\"mentioned_only\">\n" 704 "<p>%s: <input type=\"checkbox\" name=\"mentioned_only\">\n"
702 705
703 "<details><summary>%s</summary>\n" 706 "<details><summary>%s</summary>\n"
@@ -717,6 +720,7 @@ xs_str *html_entry_controls(snac *snac, xs_str *os, const xs_dict *msg, const ch
717 prev_src, 720 prev_src,
718 id, 721 id,
719 L("Sensitive content"), 722 L("Sensitive content"),
723 L("Sensitive content description"),
720 L("Only for mentioned people"), 724 L("Only for mentioned people"),
721 L("Attach..."), 725 L("Attach..."),
722 L("File"), 726 L("File"),
@@ -741,7 +745,8 @@ xs_str *html_entry_controls(snac *snac, xs_str *os, const xs_dict *msg, const ch
741 "rows=\"4\" wrap=\"virtual\" required=\"required\">%s</textarea>\n" 745 "rows=\"4\" wrap=\"virtual\" required=\"required\">%s</textarea>\n"
742 "<input type=\"hidden\" name=\"in_reply_to\" value=\"%s\">\n" 746 "<input type=\"hidden\" name=\"in_reply_to\" value=\"%s\">\n"
743 747
744 "<p>%s: <input type=\"checkbox\" name=\"sensitive\">\n" 748 "<p>%s: <input type=\"checkbox\" name=\"sensitive\"> "
749 "<input type=\"text\" name=\"summary\" placeholder=\"%s\">\n"
745 "<p>%s: <input type=\"checkbox\" name=\"mentioned_only\">\n" 750 "<p>%s: <input type=\"checkbox\" name=\"mentioned_only\">\n"
746 751
747 "<details><summary>%s</summary>\n" 752 "<details><summary>%s</summary>\n"
@@ -761,6 +766,7 @@ xs_str *html_entry_controls(snac *snac, xs_str *os, const xs_dict *msg, const ch
761 ct, 766 ct,
762 id, 767 id,
763 L("Sensitive content"), 768 L("Sensitive content"),
769 L("Sensitive content description"),
764 L("Only for mentioned people"), 770 L("Only for mentioned people"),
765 L("Attach..."), 771 L("Attach..."),
766 L("File"), 772 L("File"),
@@ -1846,6 +1852,7 @@ int html_post_handler(const xs_dict *req, const char *q_path,
1846 xs_list *attach_file = xs_dict_get(p_vars, "attach"); 1852 xs_list *attach_file = xs_dict_get(p_vars, "attach");
1847 xs_str *to = xs_dict_get(p_vars, "to"); 1853 xs_str *to = xs_dict_get(p_vars, "to");
1848 xs_str *sensitive = xs_dict_get(p_vars, "sensitive"); 1854 xs_str *sensitive = xs_dict_get(p_vars, "sensitive");
1855 xs_str *summary = xs_dict_get(p_vars, "summary");
1849 xs_str *edit_id = xs_dict_get(p_vars, "edit_id"); 1856 xs_str *edit_id = xs_dict_get(p_vars, "edit_id");
1850 xs_str *alt_text = xs_dict_get(p_vars, "alt_text"); 1857 xs_str *alt_text = xs_dict_get(p_vars, "alt_text");
1851 int priv = !xs_is_null(xs_dict_get(p_vars, "mentioned_only")); 1858 int priv = !xs_is_null(xs_dict_get(p_vars, "mentioned_only"));
@@ -1924,7 +1931,7 @@ int html_post_handler(const xs_dict *req, const char *q_path,
1924 1931
1925 if (sensitive != NULL) { 1932 if (sensitive != NULL) {
1926 msg = xs_dict_set(msg, "sensitive", xs_stock_true); 1933 msg = xs_dict_set(msg, "sensitive", xs_stock_true);
1927 msg = xs_dict_set(msg, "summary", "..."); 1934 msg = xs_dict_set(msg, "summary", xs_is_null(summary) ? "..." : summary);
1928 } 1935 }
1929 1936
1930 if (xs_is_null(edit_id)) { 1937 if (xs_is_null(edit_id)) {