diff options
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, | |||
| 778 | 778 | ||
| 779 | /* add poll controls */ | 779 | /* add poll controls */ |
| 780 | if (poll) { | 780 | if (poll) { |
| 781 | const xs_number *max_options = xs_dict_get(srv_config, "max_poll_options"); | ||
| 782 | xs *poll_limit_str = xs_dup(L("Poll options (one per line, up to 8):")); | ||
| 783 | poll_limit_str = xs_replace_i(poll_limit_str, "8", xs_number_str(max_options)); | ||
| 784 | |||
| 781 | xs_html_add(form, | 785 | xs_html_add(form, |
| 782 | xs_html_tag("p", NULL), | 786 | xs_html_tag("p", NULL), |
| 783 | xs_html_tag("details", | 787 | xs_html_tag("details", |
| 784 | xs_html_tag("summary", | 788 | xs_html_tag("summary", |
| 785 | xs_html_text(L("Poll..."))), | 789 | xs_html_text(L("Poll..."))), |
| 786 | xs_html_tag("p", | 790 | xs_html_tag("p", |
| 787 | xs_html_text(L("Poll options (one per line, up to 8):")), | 791 | xs_html_text(poll_limit_str), |
| 788 | xs_html_sctag("br", NULL), | 792 | xs_html_sctag("br", NULL), |
| 789 | xs_html_tag("textarea", | 793 | xs_html_tag("textarea", |
| 790 | xs_html_attr("class", "snac-textarea"), | 794 | xs_html_attr("class", "snac-textarea"), |