summaryrefslogtreecommitdiff
path: root/httemplate/elements
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-11-18 13:07:47 -0800
committerMark Wells <mark@freeside.biz>2015-11-18 13:07:47 -0800
commitb2fd002f3285b70311642f8ff0025598d42bd16e (patch)
tree8005ab27d04c8aaaa7e9bfd10a9ba0f48cafd967 /httemplate/elements
parent1daa37e733b9e972e5328503374130a423d02836 (diff)
track customer invoice destination emails using contact_email, #25536
Diffstat (limited to 'httemplate/elements')
-rw-r--r--httemplate/elements/contact.html14
-rw-r--r--httemplate/elements/tr-checkbox.html23
-rw-r--r--httemplate/elements/tr-td-label.html3
3 files changed, 36 insertions, 4 deletions
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 @@
% }
% }
</SELECT>
-
+% } 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 {
<INPUT TYPE = "text"
NAME = "<%$name%>_<%$field%>"
ID = "<%$id%>_<%$field%>"
SIZE = "<% $size{$field} || 14 %>"
- VALUE = "<% scalar($cgi->param($name."_$field"))
+ VALUE = "<% scalar($cgi->param($name . '_' . $field))
|| $value |h %>"
<% $onchange %>
>
@@ -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:
&>
</%doc>
-<% include('tr-td-label.html', @_ ) %>
+% if ( $opt{'box_first'} ) {
+ <TR>
+ <TH COLSPAN="<% $opt{'colspan'} || 2 %>"
+ VALIGN = "<% $opt{'valign'} || 'top' %>"
+ STYLE = "<% $style %>"
+ ID = "<% $opt{label_id} || $opt{id}. '_label0' %>"
+ >
+ <& checkbox.html, @_ &>
+ <% $required %><% $opt{label} %>
+ </TH>
+ </TR>
+% } else {
+<& tr-td-label.html, @_ &>
<TD <% $style %>>
<% include('checkbox.html', @_) %>
</TD>
</TR>
+% }
<%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'} ? '<font color="#ff0000">*</font>&nbsp;' : '';
+if ($required) {
+ $style .= ';font-weight: bold';
+}
</%init>
diff --git a/httemplate/elements/tr-td-label.html b/httemplate/elements/tr-td-label.html
index f7067221b..3111f435c 100644
--- a/httemplate/elements/tr-td-label.html
+++ b/httemplate/elements/tr-td-label.html
@@ -2,6 +2,9 @@
Actually <TR> <TH> $label </TH>
+Note that this puts the 'label' argument into the document verbatim, with no
+escaping or localization.
+
</%doc>
<TR>