diff options
| author | green <dandelions@disroot.org> | 2025-04-12 21:56:23 +0200 |
|---|---|---|
| committer | green <dandelions@disroot.org> | 2026-01-24 02:23:16 +0100 |
| commit | 50129db64b70604d347c2f21be5e5182080c6e07 (patch) | |
| tree | c1753b574db1052897276b4180ef57854f437260 /html.c | |
| parent | c6b411ac34e80505517bf120153017ec42943d4e (diff) | |
small: configurable poll limit
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -778,13 +778,17 @@ xs_html *html_note(snac *user, const char *summary, /* add poll controls */ if (poll) { + const xs_number *max_options = xs_dict_get(srv_config, "max_poll_options"); + xs *poll_limit_str = xs_dup(L("Poll options (one per line, up to 8):")); + poll_limit_str = xs_replace_i(poll_limit_str, "8", xs_number_str(max_options)); + xs_html_add(form, xs_html_tag("p", NULL), xs_html_tag("details", xs_html_tag("summary", xs_html_text(L("Poll..."))), xs_html_tag("p", - xs_html_text(L("Poll options (one per line, up to 8):")), + xs_html_text(poll_limit_str), xs_html_sctag("br", NULL), xs_html_tag("textarea", xs_html_attr("class", "snac-textarea"), |