clix.adhoc: Print form title and instructions if available

Mon, 21 Mar 2016 16:11:54 +0100

author
Kim Alvefur <zash@zash.se>
date
Mon, 21 Mar 2016 16:11:54 +0100
changeset 124
ff422623e0ba
parent 123
c61fadb9d4fa
child 125
75902417ff05

clix.adhoc: Print form title and instructions if available

clix/adhoc.lua file | annotate | diff | comparison | revisions
--- a/clix/adhoc.lua	Mon Mar 21 16:06:14 2016 +0100
+++ b/clix/adhoc.lua	Mon Mar 21 16:11:54 2016 +0100
@@ -54,6 +54,14 @@
 					if cmd.form then
 						local command_form_layout = dataforms.from_stanza(cmd.form)
 						local data = command_form_layout:data(cmd.form);
+						if data.title then
+							print("= " .. data.title .. " =");
+							print()
+						end
+						if data.instructions then
+							print(data.instructions);
+							print()
+						end
 						for i, item in ipairs(command_form_layout) do
 							if item.type ~= "hidden" then
 								print("== " .. item.name .. " ==")

mercurial