[% PROCESS elements.html; %]
[% text('Compose e-mail') %]
[% PROCESS input element_data = { name = "from" label = text("From") readonly = "readonly" type = "text" value = from }; %]
[% PROCESS input element_data = { name = "to" label = text("To") type = "text" value = to }; %]
[% PROCESS input element_data = { name = "cc" label = text("Cc") type = "text" value = cc }; %]
[% PROCESS input element_data = { name = "bcc" label = text("Bcc") type = "text" value = bcc }; %]
[% PROCESS input element_data = { name = "subject" label = text("Subject") type = "text" value = subject }; %]
[% PROCESS textarea element_data = { label = text("Body") name = "body" type = "text" value = body }; %]
[% PROCESS input element_data = { name = "notify" label = text("Read receipt") type = "checkbox" value = notify }; %]
[% FOR action IN actions ; PROCESS button element_data = { name = 'wf_action' text = maketext(action) value = action id = 'wf-action-' _ action }; END %]
[% IF attachments.size > 0 ; ''; FOR att IN attachments ; %] [% END ; # FOR '
Attachments
FilenameDescription
[% att.file_name %][% att.description %]
'; END ; # IF IF actions.grep('^Attach$').size > 0 ; %]
[% END ; # IF IF expansions.keys.size > 0 ; %]

[% text('The e-mail body may contain variables to be expanded - e.g. <%invnumber%> - the table below specifies the available variables and their expansions for this e-mail') %]

[% FOR expansion_key IN expansions.keys ; %] [% END ; # FOR %]
[% text('Variable') %] [% text('Expansion') %]
[% expansion_key %] [% expansions.$expansion_key %]
[% END ; # IF %]