diff options
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/html.c | 13 | ||||
-rw-r--r-- | src/utils/html.h | 4 |
2 files changed, 9 insertions, 8 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\"" : ""); } } diff --git a/src/utils/html.h b/src/utils/html.h index 86067a9..53d4216 100644 --- a/src/utils/html.h +++ b/src/utils/html.h @@ -85,8 +85,8 @@ mq_html_input_number_d(const gchar *name, const gchar *label, gdouble min, gdouble step, gdouble max, gdouble value); 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); gchar * mq_html_input_checkbox(const gchar *name, const gchar *label, gboolean checked); |