diff options
Diffstat (limited to 'src/utils/html.c')
-rw-r--r-- | src/utils/html.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/utils/html.c b/src/utils/html.c index 4c22221..0549457 100644 --- a/src/utils/html.c +++ b/src/utils/html.c @@ -842,21 +842,22 @@ mq_html_input_number_d(const gchar *name, const gchar *label, } gchar * -mq_html_input_radio(const gchar *name, const gchar *id, const gchar *label, - gboolean checked) +mq_html_input_radio(const gchar *name, const gchar *id, const gchar *value, + const gchar *label, gboolean checked) { if (label && label[0]) { return g_strdup_printf( "<label for=\"%s\">\n<span>%s:</span>\n" "<input type=\"radio\" name=\"%s\" " - "id=\"%s\"%s>\n" + "id=\"%s\" value=\"%s\"%s>\n" "</label>\n", - id, label, name, id, + id, label, name, id, value, checked ? " checked=\"checked\"" : ""); } else { return g_strdup_printf( - "<input type=\"radio\" name=\"%s\" id=\"%s\"%s>\n", - name, id, + "<input type=\"radio\" name=\"%s\" " + "id=\"%s\" value=\"%s\"%s>\n", + name, id, value, checked ? " checked=\"checked\"" : ""); } } |