From 96b69dd1aa5c8045b5a4297ecea510d60f575251 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Mon, 9 Nov 2015 17:05:36 -0600 Subject: RT#34960: Quotations [changed billpkgnum to quotationpkgnum] --- httemplate/edit/quotation_pkg_detail.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'httemplate') diff --git a/httemplate/edit/quotation_pkg_detail.html b/httemplate/edit/quotation_pkg_detail.html index b8f589a9a..80a904420 100644 --- a/httemplate/edit/quotation_pkg_detail.html +++ b/httemplate/edit/quotation_pkg_detail.html @@ -21,15 +21,11 @@ <% $part_pkg->comment |h %> - - Detail: - - % my $row = 0; % for ( @details ) { - + <% $row ? '' : 'Detail' %> @@ -63,6 +59,10 @@ var row = document.createElement('TR'); var empty_cell = document.createElement('TD'); + if (!rownum) { + empty_cell.innerHTML = 'Detail:' + empty_cell.style.textAlign = 'right'; + } row.appendChild(empty_cell); var detail_cell = document.createElement('TD'); -- cgit v1.2.1 From adde23e02a271005a708519efd82c43f388cfdee Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Mon, 9 Nov 2015 18:53:42 -0600 Subject: RT#18439: Sorting routers alphabetically, routers disappear --- httemplate/browse/router.cgi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'httemplate') diff --git a/httemplate/browse/router.cgi b/httemplate/browse/router.cgi index ef8ad3160..85512f8df 100644 --- a/httemplate/browse/router.cgi +++ b/httemplate/browse/router.cgi @@ -43,11 +43,13 @@ my @menubar = ( 'Add a new router', "${p2}edit/router.cgi" ); if ($cgi->param('hidecustomerrouters') eq '1') { $extra_sql = 'WHERE svcnum > 0'; - $cgi->param('hidecustomerrouters', 0); + $cgi->delete('hidecustomerrouters'); push @menubar, 'Show customer routers', $cgi->self_url(); + $cgi->param('hidecustomerrouters', 1); } else { $cgi->param('hidecustomerrouters', 1); push @menubar, 'Hide customer routers', $cgi->self_url(); + $cgi->delete('hidecustomerrouters'); } my $count_sql = $extra_sql. ( $extra_sql =~ /WHERE/ ? ' AND' : 'WHERE' ). -- cgit v1.2.1 From d719b00e871830c3b8d48d4f713ae455b4c1b5b5 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Mon, 9 Nov 2015 19:58:47 -0600 Subject: RT#36806: Add message template substitution to show last four digits of credit card number --- httemplate/edit/msg_template/email.html | 2 ++ 1 file changed, 2 insertions(+) (limited to 'httemplate') diff --git a/httemplate/edit/msg_template/email.html b/httemplate/edit/msg_template/email.html index 12a4a6f56..53f538b11 100644 --- a/httemplate/edit/msg_template/email.html +++ b/httemplate/edit/msg_template/email.html @@ -300,6 +300,7 @@ my %substitutions = ( '$payby' => 'Payment method', '$date' => 'Payment date', '$payinfo' => 'Card/account# (masked)', + '$payinfo_end' => 'Card/account last 4 digits', '$error' => 'Decline reason', ], 'cust_refund' => [ @@ -308,6 +309,7 @@ my %substitutions = ( '$payby' => 'Refund method', '$date' => 'Refund date', '$payinfo' => 'Card/account# (masked)', + '$payinfo_end' => 'Card/account last 4 digits', ], 'system_log' => [ '$logmessage' => 'Log entry message', -- cgit v1.2.1 From 49f4c49b48cc910c238a7066c7a55a937e88b61e Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Tue, 10 Nov 2015 00:03:37 -0600 Subject: RT#34960: Quotations [added attribution for icon] --- httemplate/docs/license.html | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'httemplate') diff --git a/httemplate/docs/license.html b/httemplate/docs/license.html index 7e5bb1e3e..94a8732e5 100644 --- a/httemplate/docs/license.html +++ b/httemplate/docs/license.html @@ -143,5 +143,11 @@ Contains icons from by Mark James, licensed under the terms of the Creative Commons Attribution 2.5 License. +

+Includes icon from +http://www.iconarchive.com/show/oxygen-icons-by-oxygen-icons.org/Actions-document-edit-icon.html +licensed under GNU Lesser General Public License +

+ -- cgit v1.2.1 From c44432a5f0f1c1841ff8b50e734a30bd9aeef945 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Thu, 12 Nov 2015 16:49:39 -0800 Subject: limit password reuse, core and svc_acct, #29354 --- httemplate/edit/process/svc_acct.cgi | 7 ++++++- httemplate/misc/process/change-password.html | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'httemplate') diff --git a/httemplate/edit/process/svc_acct.cgi b/httemplate/edit/process/svc_acct.cgi index 9cac2c568..d75ff92c1 100755 --- a/httemplate/edit/process/svc_acct.cgi +++ b/httemplate/edit/process/svc_acct.cgi @@ -81,7 +81,12 @@ if ( $cgi->param('clear_password') eq '*HIDDEN*' || $cgi->param('clear_password') =~ /^\(.* encrypted\)$/ ) { die "fatal: no previous account to recall hidden password from!" unless $old; } else { - $error ||= $new->set_password($cgi->param('clear_password')); + my $newpass = $cgi->param('clear_password'); + if ( ! $old->check_password($newpass) ) { + # then the password is being changed + $error ||= $new->is_password_allowed($newpass) + || $new->set_password($newpass); + } } if ( ! $error ) { diff --git a/httemplate/misc/process/change-password.html b/httemplate/misc/process/change-password.html index 7cab9c4e3..d58ce544d 100644 --- a/httemplate/misc/process/change-password.html +++ b/httemplate/misc/process/change-password.html @@ -11,7 +11,9 @@ die "access denied" unless ( ( $curuser->access_right('Edit password') and ! $part_svc->restrict_edit_password ) ); -my $error = $svc_acct->set_password($cgi->param('password')) +my $newpass = $cgi->param('password'); +my $error = $svc_acct->is_password_allowed($newpass) + || $svc_acct->set_password($newpass) || $svc_acct->replace; # annoyingly specific to view/svc_acct.cgi, for now... -- cgit v1.2.1 From ca24c5a345c866a069ac4fe58f1567dc38b79478 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Fri, 13 Nov 2015 01:12:37 -0600 Subject: RT#17480: Freeside Cancel Reason --- httemplate/browse/reason.html | 22 +++++++++++++++++++++- httemplate/browse/reason_type.html | 21 +++++++++++++++++++-- httemplate/search/elements/checkbox-foot.html | 9 +++++++++ 3 files changed, 49 insertions(+), 3 deletions(-) (limited to 'httemplate') diff --git a/httemplate/browse/reason.html b/httemplate/browse/reason.html index 8af88a950..bdbcf3704 100644 --- a/httemplate/browse/reason.html +++ b/httemplate/browse/reason.html @@ -18,6 +18,8 @@ 'fields' => \@fields, 'links' => \@links, 'align' => $align, + 'html_form' => qq!
!, + 'html_foot' => $html_foot, ) %> <%init> @@ -31,7 +33,8 @@ my $class = $1; my $classname = $FS::reason_type::class_name{$class}; my $classpurpose = $FS::reason_type::class_purpose{$class}; -my $html_init = ucfirst($classname). " reasons $classpurpose.

". +my $html_init = include('/elements/init_overlib.html'). +ucfirst($classname). " reasons $classpurpose.

". qq!!. "Add a $classname reason

"; @@ -107,5 +110,22 @@ if ( $class eq 'S' ) { $align .= 'cl'; } +# reason merge handling +push @header, ''; +push @fields, sub { + my $reason = shift; + my $reasonnum = $reason->reasonnum; + qq!!; +}; +push @links, ''; +$align .= 'l'; +my $html_foot = include('/search/elements/checkbox-foot.html', + onclick => include( '/elements/popup_link_onclick.html', + js_action => q!'! . "${p}misc/reason-merge.html?" . q!' + toCGIString()!, + actionlabel => 'Merge reasons', + ), + label => 'merge selected reasons', + minboxes => 2, +) . '
'; diff --git a/httemplate/browse/reason_type.html b/httemplate/browse/reason_type.html index 0cb6e7a39..e5f42e839 100644 --- a/httemplate/browse/reason_type.html +++ b/httemplate/browse/reason_type.html @@ -21,6 +21,8 @@ '', ], 'disable_total' => 1, + 'html_form' => qq!
!, + 'html_foot' => $html_foot, &> <%init> @@ -44,7 +46,8 @@ my $html_init = 'Reasons: ' . } keys (%FS::reason_type::class_name) ); -$html_init .= '

' . +$html_init .= include('/elements/init_overlib.html'). + '

' . $classname . ' reasons ' . $FS::reason_type::class_purpose{$class} . '. Reason types allow reasons to be grouped for reporting purposes.' . @@ -64,6 +67,10 @@ my $reasons_sub = sub { 'link' => $p. "edit/reason.html?class=$class&reasonnum=". $_->reasonnum, }, + { + 'data' => q!!, + 'align' => 'right', + }, ]; } $reason_type->enabled_reasons ), @@ -73,7 +80,8 @@ my $reasons_sub = sub { 'align' => 'left', 'link' => $p. "edit/reason.html?class=$class", 'data_style' => 'i', - } + }, + { 'data' => '' }, ] ]; @@ -86,4 +94,13 @@ $count_query .= $where_clause; my $link = [ $p.'edit/reason_type.html?class='.$class.'&typenum=', 'typenum' ]; +my $html_foot = include('/search/elements/checkbox-foot.html', + onclick => include( '/elements/popup_link_onclick.html', + js_action => q!'! . "${p}misc/reason-merge.html?" . q!' + toCGIString()!, + actionlabel => 'Merge reasons', + ), + label => 'merge selected reasons', + minboxes => 2, +) . '

'; + diff --git a/httemplate/search/elements/checkbox-foot.html b/httemplate/search/elements/checkbox-foot.html index c47009425..ae8b79470 100644 --- a/httemplate/search/elements/checkbox-foot.html +++ b/httemplate/search/elements/checkbox-foot.html @@ -11,6 +11,7 @@ }, ], filter => '.name = "pkgpart"', # see below + minboxes => 2, #will remove checkboxes if there aren't at least this many ), &> @@ -67,6 +68,14 @@ for (var i = 0; i < inputs.length; i++) { } } %# avoid the need for "$areboxes" late-evaluation hackery +% if ($opt{'minboxes'}) { +if ( checkboxes.length < <% $opt{'minboxes'} %> ) { + for (i = 0; i < checkboxes.length; i++) { + checkboxes[i].parentNode.removeChild(checkboxes[i]); + } + checkboxes = []; +} +% } if ( checkboxes.length == 0 ) { document.getElementById('checkbox_footer').style.display = 'none'; } -- cgit v1.2.1