diff options
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 25 |
1 files changed, 25 insertions, 0 deletions
| @@ -458,6 +458,31 @@ xs_html *html_note(snac *user, const char *summary, | |||
| 458 | xs_html_attr("name", "is_draft"), | 458 | xs_html_attr("name", "is_draft"), |
| 459 | xs_html_attr(is_draft ? "checked" : "", NULL)))); | 459 | xs_html_attr(is_draft ? "checked" : "", NULL)))); |
| 460 | 460 | ||
| 461 | const char *post_langs = xs_dict_get(user->config, "post_langs"); | ||
| 462 | |||
| 463 | if (xs_is_string(post_langs) && *post_langs) { | ||
| 464 | xs *ll = xs_split(post_langs, " "); | ||
| 465 | const char *lang; | ||
| 466 | |||
| 467 | xs_html *post_lang = xs_html_tag("select", | ||
| 468 | xs_html_attr("name", "post_lang")); | ||
| 469 | |||
| 470 | xs_list_foreach(ll, lang) { | ||
| 471 | if (*lang) { | ||
| 472 | xs_html_add(post_lang, | ||
| 473 | xs_html_tag("option", | ||
| 474 | xs_html_text(lang), | ||
| 475 | xs_html_attr("value", lang))); | ||
| 476 | } | ||
| 477 | } | ||
| 478 | |||
| 479 | xs_html_add(form, | ||
| 480 | xs_html_tag("p", NULL), | ||
| 481 | xs_html_text(L("Language:")), | ||
| 482 | xs_html_text(" "), | ||
| 483 | post_lang); | ||
| 484 | } | ||
| 485 | |||
| 461 | /* post date and time */ | 486 | /* post date and time */ |
| 462 | xs *post_date = NULL; | 487 | xs *post_date = NULL; |
| 463 | xs *post_time = NULL; | 488 | xs *post_time = NULL; |