[% IF id;
formats = [];
FOR F IN LIST_FORMATS();
IF F == 'HTML' or F == 'PDF';
formats.push({text = F, id = F});
END;
END;
PROCESS print_options;
END; %]
[%
IF id;
PROCESS button element_data = {
name = '__action'
class = 'submit'
text = text('Print')
value = 'print'
"data-dojo-type" = "lsmb/PrintButton"
};
ELSE;
PROCESS button element_data = {
name = '__action'
type = 'submit'
class = 'submit'
text = text('Save')
'data-lsmb-doing' = text('Saving...')
'data-lsmb-done' = text('Saved')
value = 'save'
};
END;
%]