equal
deleted
inserted
replaced
26 end |
26 end |
27 |
27 |
28 function form_t.form(layout, data, formtype) |
28 function form_t.form(layout, data, formtype) |
29 if not formtype then formtype = "form" end |
29 if not formtype then formtype = "form" end |
30 local form = st.stanza("x", { xmlns = xmlns_forms, type = formtype }); |
30 local form = st.stanza("x", { xmlns = xmlns_forms, type = formtype }); |
|
31 if formtype == "cancel" then |
|
32 return form; |
|
33 end |
31 if layout.title then |
34 if layout.title then |
32 form:tag("title"):text(layout.title):up(); |
35 form:tag("title"):text(layout.title):up(); |
33 end |
36 end |
34 if layout.instructions then |
37 if layout.instructions then |
35 form:tag("instructions"):text(layout.instructions):up(); |
38 form:tag("instructions"):text(layout.instructions):up(); |