[ADD] No-fly, forms

This commit is contained in:
LDA 2024-07-14 11:42:30 +02:00
commit df394172ec
11 changed files with 338 additions and 52 deletions

View file

@ -35,4 +35,36 @@
} \
while(0)
#define GetFieldValue(to, id, form) do \
{ \
XMLElement *field_content = XMLookForTKV(form, "field", "var", id); \
XMLElement *value = XMLookForUnique(field_content, "value"); \
XMLElement *val_data = value ? ArrayGet(value->children, 0) : NULL; \
if (val_data && val_data->data) \
{ \
to = val_data->data; \
} \
} \
while(0)
#define SetNote(type, text) do \
{ \
XMLElement *note_xml = XMLCreateTag("note"); \
XMLElement *note_msg = XMLCreateText(text); \
XMLAddAttr(note_xml, "type", type); \
XMLAddChild(note_xml, note_msg); \
XMLAddChild(out, note_xml); \
} \
while(0)
#define SetTitle(form, text) do \
{ \
XMLElement *title_xml, *title_txt; \
title_xml = XMLCreateTag("title"); \
title_txt = XMLCreateText(text); \
XMLAddChild(title_xml, title_txt); \
XMLAddChild(form, title_xml); \
} \
while(0)
#endif