summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--html.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/html.c b/html.c
index eec1760..6310ed4 100644
--- a/html.c
+++ b/html.c
@@ -278,7 +278,9 @@ xs_html *html_note(snac *user, const char *summary,
278 const xs_val *cw_yn, const char *cw_text, 278 const xs_val *cw_yn, const char *cw_text,
279 const xs_val *mnt_only, const char *redir, 279 const xs_val *mnt_only, const char *redir,
280 const char *in_reply_to, int poll, 280 const char *in_reply_to, int poll,
281 const char *att_file, const char *att_alt_text) 281 const char *att_file, const char *att_alt_text,
282 int is_draft)
283/* Yes, this is a FUCKTON of arguments and I'm a bit embarrased */
282{ 284{
283 xs *action = xs_fmt("%s/admin/note", user->actor); 285 xs *action = xs_fmt("%s/admin/note", user->actor);
284 286
@@ -363,7 +365,8 @@ xs_html *html_note(snac *user, const char *summary,
363 xs_html_text(L("Draft:")), 365 xs_html_text(L("Draft:")),
364 xs_html_sctag("input", 366 xs_html_sctag("input",
365 xs_html_attr("type", "checkbox"), 367 xs_html_attr("type", "checkbox"),
366 xs_html_attr("name", "is_draft"))); 368 xs_html_attr("name", "is_draft"),
369 xs_html_attr(is_draft ? "checked" : "", NULL)));
367 370
368 if (edit_id) 371 if (edit_id)
369 xs_html_add(form, 372 xs_html_add(form,
@@ -924,7 +927,7 @@ xs_html *html_top_controls(snac *snac)
924 NULL, NULL, 927 NULL, NULL,
925 xs_stock(XSTYPE_FALSE), "", 928 xs_stock(XSTYPE_FALSE), "",
926 xs_stock(XSTYPE_FALSE), NULL, 929 xs_stock(XSTYPE_FALSE), NULL,
927 NULL, 1, "", ""), 930 NULL, 1, "", "", 0),
928 931
929 /** operations **/ 932 /** operations **/
930 xs_html_tag("details", 933 xs_html_tag("details",
@@ -1412,7 +1415,7 @@ xs_html *html_entry_controls(snac *snac, const char *actor,
1412 id, NULL, 1415 id, NULL,
1413 xs_dict_get(msg, "sensitive"), xs_dict_get(msg, "summary"), 1416 xs_dict_get(msg, "sensitive"), xs_dict_get(msg, "summary"),
1414 xs_stock(is_msg_public(msg) ? XSTYPE_FALSE : XSTYPE_TRUE), redir, 1417 xs_stock(is_msg_public(msg) ? XSTYPE_FALSE : XSTYPE_TRUE), redir,
1415 NULL, 0, att_file, att_alt_text)), 1418 NULL, 0, att_file, att_alt_text, is_draft(snac, id))),
1416 xs_html_tag("p", NULL)); 1419 xs_html_tag("p", NULL));
1417 } 1420 }
1418 1421
@@ -1431,7 +1434,7 @@ xs_html *html_entry_controls(snac *snac, const char *actor,
1431 NULL, NULL, 1434 NULL, NULL,
1432 xs_dict_get(msg, "sensitive"), xs_dict_get(msg, "summary"), 1435 xs_dict_get(msg, "sensitive"), xs_dict_get(msg, "summary"),
1433 xs_stock(is_msg_public(msg) ? XSTYPE_FALSE : XSTYPE_TRUE), redir, 1436 xs_stock(is_msg_public(msg) ? XSTYPE_FALSE : XSTYPE_TRUE), redir,
1434 id, 0, "", "")), 1437 id, 0, "", "", 0)),
1435 xs_html_tag("p", NULL)); 1438 xs_html_tag("p", NULL));
1436 } 1439 }
1437 1440
@@ -2484,7 +2487,7 @@ xs_html *html_people_list(snac *snac, xs_list *list, char *header, char *t)
2484 NULL, actor_id, 2487 NULL, actor_id,
2485 xs_stock(XSTYPE_FALSE), "", 2488 xs_stock(XSTYPE_FALSE), "",
2486 xs_stock(XSTYPE_FALSE), NULL, 2489 xs_stock(XSTYPE_FALSE), NULL,
2487 NULL, 0, "", ""), 2490 NULL, 0, "", "", 0),
2488 xs_html_tag("p", NULL)); 2491 xs_html_tag("p", NULL));
2489 2492
2490 xs_html_add(snac_post, snac_controls); 2493 xs_html_add(snac_post, snac_controls);