From e06cc0842575ebafd92213027287a1d6bc75459e Mon Sep 17 00:00:00 2001 From: Michel Le Bihan Date: Wed, 17 Feb 2021 22:57:53 +0100 Subject: Improve IBR form handling (#990) * Change register account dialog to show instructions Change data forms to handle title and instructions elements * Change register account dialog to show fixed fields Closes #988 * Change form switch to halign start Closes #992 * Change register account dialog to markup URLs --- xmpp-vala/src/module/xep/0004_data_forms.vala | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'xmpp-vala') diff --git a/xmpp-vala/src/module/xep/0004_data_forms.vala b/xmpp-vala/src/module/xep/0004_data_forms.vala index 1ed899fc..fe39874a 100644 --- a/xmpp-vala/src/module/xep/0004_data_forms.vala +++ b/xmpp-vala/src/module/xep/0004_data_forms.vala @@ -9,6 +9,8 @@ public class DataForm { public StanzaNode stanza_node { get; set; } public Gee.List fields = new ArrayList(); public string? form_type = null; + public string? instructions = null; + public string? title = null; public StanzaNode get_submit_node() { stanza_node.set_attribute("type", "submit"); @@ -215,6 +217,16 @@ public class DataForm { fields.add(new TextSingleField(field_node)); break; } } + + StanzaNode? instructions_node = node.get_subnode("instructions", NS_URI); + if (instructions_node != null) { + instructions = instructions_node.get_string_content(); + } + + StanzaNode? title_node = node.get_subnode("title", NS_URI); + if (title_node != null) { + title = title_node.get_string_content(); + } } internal DataForm() { -- cgit v1.2.3-70-g09d2