tadd a <label> for the options which allows to click on the label text - vote -… | |
git clone git://src.adamsgaard.dk/vote | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 3b3d8028f259aa8c06d9fda45c38de975b3df2d2 | |
parent b1543e65991695c6b455382a9a9b86b1bec42a6c | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Sun, 4 Oct 2020 15:50:19 +0200 | |
add a <label> for the options which allows to click on the label text | |
Signed-off-by: Anders Damsgaard <[email protected]> | |
Diffstat: | |
M vote.c | 8 +++++--- | |
1 file changed, 5 insertions(+), 3 deletions(-) | |
--- | |
diff --git a/vote.c b/vote.c | |
t@@ -120,11 +120,13 @@ print_poll_line(char *line, size_t *i, int intable, int … | |
puts("<table>"); | |
} | |
if (vote) { | |
+ (*i)++; | |
printf("\t<tr><td class=\"choice\">"); | |
printf("<input type=\"radio\" " | |
- "id=\"%ld\" name=\"choice\" value=\"%ld\" />", | |
- ++*i, *i); | |
- printf("</td><td>%s</td></tr>\n", options); | |
+ "id=\"o%ld\" name=\"choice\" value=\"%ld\" />", | |
+ *i, *i); | |
+ printf("</td><td><label for=\"o%ld\">%s</label></td></… | |
+ *i, options); | |
} else | |
printf("\t<tr><td class=\"choice\">%ld</td><td>%s</td>… | |
c, options); |