From 7b46a6c58eb50c8952dc50d69279596c7bce7bd4 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 04 Nov 2017 13:33:22 -0400 Subject: mq_html_input_checkbox(): Allow label to be disabled --- diff --git a/src/utils/html.c b/src/utils/html.c index ac4ae9f..20a1c96 100644 --- a/src/utils/html.c +++ b/src/utils/html.c @@ -725,11 +725,25 @@ mq_html_input_checkbox(const gchar *name, const gchar *label, gboolean checked) * when the former is checked. */ - return g_strdup_printf("\n", - name, label, name, name, name, - checked ? " checked=\"checked\"" : ""); + if (label && label[0]) { + return g_strdup_printf( + "\n", + name, label, name, name, name, + checked ? " checked=\"checked\"" : ""); + } else { + return g_strdup_printf( + "\n" + "\n", + name, name, name, + checked ? " checked=\"checked\"" : ""); + } } gchar * -- cgit v0.9.1