From 981def910b11dca767b6e9643448e0a2d3332dac Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Sun, 7 May 2017 15:33:09 +0200 Subject: [PATCH] Setting of long-name on setting label only if it is null. --- src/formelement.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/formelement.c b/src/formelement.c index 9a2717c..b3a790a 100644 --- a/src/formelement.c +++ b/src/formelement.c @@ -140,7 +140,10 @@ zak_form_cgi_form_element_set_label (ZakFormCgiFormElement *element, const gchar g_hash_table_replace (priv->ht_label_attrs, "for", priv->id != NULL ? g_strdup (priv->id) : g_strdup ("")); g_hash_table_replace (priv->ht_label_attrs, "class", g_strdup ("control-label")); - zak_form_element_set_long_name (ZAK_FORM_ELEMENT (element), label); + if (zak_form_element_get_long_name (ZAK_FORM_ELEMENT (element)) == NULL) + { + zak_form_element_set_long_name (ZAK_FORM_ELEMENT (element), label); + } } } -- 2.49.0