From ded0cb9e764cd806a13aaf6ddb8cdfe0f3215999 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Wed, 18 Nov 2015 13:07:47 -0800 Subject: track customer invoice destination emails using contact_email, #25536 --- httemplate/elements/contact.html | 14 ++++++++++++-- httemplate/elements/tr-checkbox.html | 23 +++++++++++++++++++++-- httemplate/elements/tr-td-label.html | 3 +++ 3 files changed, 36 insertions(+), 4 deletions(-) (limited to 'httemplate/elements') diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html index 87e15debe..ab14dfbe8 100644 --- a/httemplate/elements/contact.html +++ b/httemplate/elements/contact.html @@ -59,13 +59,22 @@ % } % } - +% } elsif ( $field eq 'invoice_dest' ) { +% my $curr_value = $cgi->param($name . '_' . $field); +% $curr_value = $value if !defined($curr_value); + <& select.html, + field => $name . '_' . $field, + curr_value => $curr_value, + options => [ '', 'Y' ], + option_labels => { '' => 'no', 'Y' => 'yes' }, + style => 'width: 100%', + &> % } else { > @@ -130,6 +139,7 @@ tie my %label, 'Tie::IxHash', 'last' => 'Last name', 'title' => 'Title/Position', 'emailaddress' => 'Email', + 'invoice_dest' => 'Send invoices', 'selfservice_access' => 'Self-service' ; diff --git a/httemplate/elements/tr-checkbox.html b/httemplate/elements/tr-checkbox.html index 5761263cf..ed166502b 100644 --- a/httemplate/elements/tr-checkbox.html +++ b/httemplate/elements/tr-checkbox.html @@ -9,13 +9,26 @@ Example: &> -<% include('tr-td-label.html', @_ ) %> +% if ( $opt{'box_first'} ) { + + + <& checkbox.html, @_ &> + <% $required %><% $opt{label} %> + + +% } else { +<& tr-td-label.html, @_ &> > <% include('checkbox.html', @_) %> +% } <%init> @@ -25,6 +38,12 @@ my $onchange = $opt{'onchange'} ? 'onChange="'. $opt{'onchange'}. '(this)"' : ''; -my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : ''; +my $style = 'text-align: left; padding-top: 3px'; +$style .= '; '. $opt{'cell_style'} if $opt{'cell_style'}; + +my $required = $opt{'required'} ? '* ' : ''; +if ($required) { + $style .= ';font-weight: bold'; +} diff --git a/httemplate/elements/tr-td-label.html b/httemplate/elements/tr-td-label.html index 78690f1fb..3535c63ff 100644 --- a/httemplate/elements/tr-td-label.html +++ b/httemplate/elements/tr-td-label.html @@ -2,6 +2,9 @@ Actually $label +Note that this puts the 'label' argument into the document verbatim, with no +escaping or localization. + -- cgit v1.2.1