summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-11-06 14:19:35 (EST)
committer Patrick McDermott <pj@pehjota.net>2017-11-06 14:19:35 (EST)
commit162c171512ee11a7fd1e5acdef45a9070e2c71f8 (patch)
tree2530b80c97faccbb693fa35b4c2b8efa272ed392
parent3be2cd45fcc550a3d76d2d2551f04c220d51d533 (diff)
downloadmarquee-162c171512ee11a7fd1e5acdef45a9070e2c71f8.zip
marquee-162c171512ee11a7fd1e5acdef45a9070e2c71f8.tar.gz
marquee-162c171512ee11a7fd1e5acdef45a9070e2c71f8.tar.bz2
mq_html_input_hidden(): New function
-rw-r--r--src/utils/html.c9
-rw-r--r--src/utils/html.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/src/utils/html.c b/src/utils/html.c
index 95d7cdc..4ceeb8b 100644
--- a/src/utils/html.c
+++ b/src/utils/html.c
@@ -925,6 +925,15 @@ mq_html_input_checkbox(const gchar *name, const gchar *label, gboolean checked)
}
gchar *
+mq_html_input_hidden(const gchar *name, const gchar *value)
+{
+ return g_strdup_printf(
+ "<input type=\"text\" name=\"%s\" id=\"%s\" "
+ "value=\"%s\">\n",
+ name, name, value ? value : "");
+}
+
+gchar *
mq_html_input_select(const gchar *name, const gchar *label,
const gchar *selected,
GDestroyNotify destroy_value, GDestroyNotify destroy_label, ...)
diff --git a/src/utils/html.h b/src/utils/html.h
index 2d33994..724c7cf 100644
--- a/src/utils/html.h
+++ b/src/utils/html.h
@@ -104,6 +104,9 @@ gchar *
mq_html_label(const gchar *for_id, const gchar *label, gboolean add_colon);
gchar *
+mq_html_input_hidden(const gchar *name, const gchar *value);
+
+gchar *
mq_html_submit(const gchar *name, const gchar *label, gboolean disabled);
gchar *