1 <& /elements/header-popup.html, mt('Select recipients') &>
3 <% include('/elements/error.html') %>
5 <FORM NAME="OneTrueForm" METHOD="POST" ACTION="process/email-quotation.html" onSubmit="document.OneTrueForm.submit.disabled=true; document.OneTrueForm.submit.style.display='none'; document.getElementById('emailingwait').style.display='';">
6 <INPUT TYPE="hidden" NAME="quotationnum" VALUE="<% $quotationnum %>">
8 <% ntable("#cccccc", 2) %>
12 % if ( my $cust_main = $quotation->cust_main ) {
13 % foreach my $email ( $cust_main->invoicing_list_emailonly ) {
15 <& .emailrow, $email &>
19 % my @contact = $quotation->custnum ? $quotation->cust_main->cust_contact
20 % : $quotation->prospect_main->contact;
21 % foreach my $contact ( @contact ) {
22 % foreach my $contact_email ( $contact->contact_email ) {
24 <& .emailrow, $contact_email->emailaddress, $contact->firstlast &>
29 % my( $email, $name ) = @_;
31 % $name = "$name <$email>";
36 <TD><INPUT TYPE="checkbox" NAME="emailaddress" VALUE="<% $email |h %>"></TD>
37 <TD><% $name |h %></TD>
47 <BUTTON TYPE="submit" NAME="submit" ID="submit">Email quotation</BUTTON>
48 <DIV ID="emailingwait" STYLE="display:none">
49 <IMG SRC="<%$p%>images/wait-orange.gif"> <B>Sending...</B>
52 <FONT SIZE="+1" COLOR="#ff0000"><% mt('Add a contact email address first') |h %></FONT>
58 <& /elements/footer-popup.html &>
62 # unless $FS::CurrentUser::CurrentUser->access_right('Generate quotation'); #separate rights to generate vs send/email?
64 $cgi->param('quotationnum') =~ /^(\d+)$/ or die "Illegal quotationnum";
65 my $quotationnum = $1;
68 my $quotation = qsearchs('quotation', { 'quotationnum'=>$quotationnum })
69 or die "Unknown quotationnum";