+</SCRIPT>
+% if ( $msg_template and $msg_template->disabled ) {
+% # if we've already established a draft template, don't let msgnum be changed
+ <& /elements/hidden.html,
+ field => 'msgnum',
+ curr_value => ($cgi->param('msgnum') || ''),
+ &>
+% } else {
+Template:
+ <& /elements/select-msg_template.html,
+ onchange => 'toggle(this)',
+ curr_value => ($cgi->param('msgnum') || ''),
+ &>
+ <BR>
+% }
+ <TABLE BGCOLOR="#cccccc" CELLSPACING=0 WIDTH="100%" id="table_no_template">
+ <& /elements/tr-td-label.html, 'label' => 'From:' &>
+ <TD><& /elements/input-text.html,
+ 'field' => 'from_name',
+ 'value' => $conf->config('invoice_from_name', $agent_virt_agentnum) ||
+ $conf->config('company_name', $agent_virt_agentnum), #?
+ 'size' => 20,
+ 'curr_value' => $cgi->param('from_name'),
+ &> <\
+ <& /elements/input-text.html,
+ 'field' => 'from_addr',
+ 'type' => 'email', # HTML5, woot
+ 'value' => $conf->config('invoice_from', $agent_virt_agentnum),
+ 'size' => 20,
+ 'curr_value' => $cgi->param('from_addr'),
+ &>></TD>
+
+ <& /elements/tr-input-text.html,