diff options
author | Michel Le Bihan <michel@lebihan.pl> | 2021-02-17 22:57:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-17 22:57:53 +0100 |
commit | e06cc0842575ebafd92213027287a1d6bc75459e (patch) | |
tree | b482f8f87585043c7af24c281973f920df326b55 /xmpp-vala/src/module | |
parent | a417cb396b18fe7ffc2a75fc640327d70793f85d (diff) | |
download | dino-e06cc0842575ebafd92213027287a1d6bc75459e.tar.gz dino-e06cc0842575ebafd92213027287a1d6bc75459e.zip |
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
Diffstat (limited to 'xmpp-vala/src/module')
-rw-r--r-- | xmpp-vala/src/module/xep/0004_data_forms.vala | 12 |
1 files changed, 12 insertions, 0 deletions
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<Field> fields = new ArrayList<Field>(); 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() { |