From 8ca45ec1f1ab960ee1e262ee764f05d214728d05 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 4 Sep 2018 08:30:35 -0400 Subject: RT# 75817 - Added password change link to cust main page --- httemplate/elements/change_password.html | 15 ++++---- httemplate/elements/contact.html | 10 +++--- httemplate/elements/validate_password.html | 55 ++---------------------------- 3 files changed, 13 insertions(+), 67 deletions(-) (limited to 'httemplate/elements') diff --git a/httemplate/elements/change_password.html b/httemplate/elements/change_password.html index 7d95e19dc..65b7d8502 100644 --- a/httemplate/elements/change_password.html +++ b/httemplate/elements/change_password.html @@ -11,9 +11,9 @@ % if (!$opt{'no_label_display'}) { (<% emt( $change_title ) %>) % } -
+
% if (!$opt{'noformtag'}) { -
+ % } <% $change_id_input %> @@ -44,11 +44,8 @@ function <%$pre%>toggle(toggle, clear) { if (clear) { document.getElementById('<%$pre%>password').value = ''; document.getElementById('<%$pre%>password_result').innerHTML = ''; -% if ($opt{'contact_num'}) { - document.getElementById('<% $opt{'pre_pwd_field_label'} %>selfservice_access').value = 'Y'; -% } } - document.getElementById('<%$pre%>form').style.display = + document.getElementById('<%$pre%>div').style.display = toggle ? 'inline-block' : 'none'; % if (!$opt{'no_label_display'}) { document.getElementById('<%$pre%>link').style.display = @@ -56,7 +53,7 @@ function <%$pre%>toggle(toggle, clear) { % } } -function checkPasswordValidation() { +function <%$pre%>checkPasswordValidation(resultId) { var validationResult = document.getElementById('<%$pre%>password_result').innerHTML; if (validationResult.match(/Password valid!/)) { return true; @@ -83,8 +80,8 @@ if ($opt{'svc_acct'}) { } elsif ($opt{'contact_num'}) { $change_id_input = ' - - + + '; $pre .= $opt{'pre_pwd_field_label'}; } diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html index 7b6c853d4..5588890c8 100644 --- a/httemplate/elements/contact.html +++ b/httemplate/elements/contact.html @@ -76,12 +76,10 @@ placeholder = "<% $value |h %>" > % my $contactnum = $curr_value ? $curr_value : '0'; - <& '/elements/validate_password.html', - 'fieldid' => "changepw".$id."_password", - 'svcnum' => '', - 'contactnum' => $contactnum, - 'submitid' => "submit", - &> + + <%init> -- cgit v1.2.1 From 0c9c9e95f2f32e7d55dd53f2903c21eb8ce7af6b Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 4 Sep 2018 08:32:21 -0400 Subject: RT# 75817 - added new file to hold javascript for password validation --- httemplate/elements/validate_password_js.html | 71 +++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 httemplate/elements/validate_password_js.html (limited to 'httemplate/elements') diff --git a/httemplate/elements/validate_password_js.html b/httemplate/elements/validate_password_js.html new file mode 100644 index 000000000..64db0a97b --- /dev/null +++ b/httemplate/elements/validate_password_js.html @@ -0,0 +1,71 @@ +<%doc> + +JavaScript to perform password validation + + <& '/elements/validate_password_js.html', + contactnum => $contactnum, + svcnum => $svcnum + &> + +The ID of the input field can be anything; the ID of the DIV in which to display results +should be the input id plus '_result'. + + + +<& '/elements/xmlhttp.html', + 'url' => $p.'misc/xmlhttp-validate_password.html', + 'subs' => [ 'validate_password' ], + 'method' => 'POST', # important not to put passwords in url +&> + + +<%init> +my %opt = @_; + \ No newline at end of file -- cgit v1.2.1 From 4e00b1e784fdb369fefd538f27c1ac465e5abc9a Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Fri, 7 Sep 2018 10:55:19 -0400 Subject: RT# 75817 - fixed saving of password for new contacts, and password validation on dynamicly created rows --- httemplate/elements/contact.html | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) (limited to 'httemplate/elements') diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html index 5588890c8..5fa8ae485 100644 --- a/httemplate/elements/contact.html +++ b/httemplate/elements/contact.html @@ -1,4 +1,6 @@ -% unless ( $opt{'js_only'} ) { +% if ( $opt{'js_only'} ) { +<% $js %> +% } else { @@ -75,23 +77,8 @@ VALUE = "" placeholder = "<% $value |h %>" > -% my $contactnum = $curr_value ? $curr_value : '0'; - - - % } elsif ( $field eq 'invoice_dest' || $field eq 'message_dest' ) { % my $curr_value = $cgi->param($name . '_' . $field); @@ -136,6 +123,7 @@ my $name = $opt{'element_name'} || $opt{'field'} || 'contactnum'; my $id = $opt{'id'} || 'contactnum'; my $curr_value = $opt{'curr_value'} || $opt{'value'}; +my $contactnum = $curr_value ? $curr_value : '0'; my $onchange = ''; if ( $opt{'onchange'} ) { @@ -203,4 +191,19 @@ $label{'comment'} = 'Comment'; my @fields = $opt{'name_only'} ? qw( first last ) : keys %label; +my $js = qq( + add_password_validation('changepw$id\_password', 'submit', '', '$contactnum'); + + var selfService = document.getElementById("$id\_selfservice_access").value; + + if (selfService !== "Y") { document.getElementById("changepw$id\_password").disabled = 'true'; } + document.getElementById("$id\_selfservice_access").onchange = function() { + if (this.value == "P" || this.value == "E" || this.value =="Y") { + document.getElementById("changepw$id\_password").disabled = ''; + } + else { document.getElementById("changepw$id\_password").disabled = 'true'; } + return false; + } +); + -- cgit v1.2.1 From 40062272379e4c32add419f839da60742719da2d Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Sun, 9 Sep 2018 16:12:23 -0400 Subject: RT# 75817 - cleaned up password validation error message --- httemplate/elements/contact.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/elements') diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html index 5fa8ae485..909ff7893 100644 --- a/httemplate/elements/contact.html +++ b/httemplate/elements/contact.html @@ -103,7 +103,7 @@
<% $label{$field} %> % if ( $field eq 'password' ) { -
+
% } % } -- cgit v1.2.1 From dc04294e8be2526714fb652fed479d379e444a32 Mon Sep 17 00:00:00 2001 From: Mitch Jackson Date: Tue, 11 Sep 2018 06:06:33 -0400 Subject: RT# 78547 Future autobill report - dynamic navigation --- httemplate/elements/menu.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'httemplate/elements') diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index eb065b668..cae0cdbfb 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -418,7 +418,9 @@ if( $curuser->access_right('Financial reports') ) { $report_financial{'Customer Accounting Summary'} = [ $fsurl.'search/report_customer_accounting_summary.html', 'Customer accounting summary report' ]; - $report_financial{'Upcoming Auto-Bill Transactions'} = [ $fsurl.'search/report_future_autobill.html', 'Upcoming auto-bill transactions' ]; + if ( my $report_title = FS::cust_payby->future_autobill_report_title ) { + $report_financial{$report_title} = [ $fsurl.'search/report_future_autobill.html', "$report_title for customers with automatic payment methods (by date)" ]; + } } elsif($curuser->access_right('Receivables report')) { -- cgit v1.2.1 From fe293dc0ca4ea3939de9c2ad28d3aaf7c8980644 Mon Sep 17 00:00:00 2001 From: Mitch Jackson Date: Wed, 12 Sep 2018 23:32:52 -0400 Subject: RT# 80624 Detect and warn for bad MS Edge version --- httemplate/elements/header.html | 1 + 1 file changed, 1 insertion(+) (limited to 'httemplate/elements') diff --git a/httemplate/elements/header.html b/httemplate/elements/header.html index c6b10e301..6df45fb07 100644 --- a/httemplate/elements/header.html +++ b/httemplate/elements/header.html @@ -4,3 +4,4 @@ % } else { <& header-full.html, @_ &> % } +<& /misc/edge_browser_check-header.html &> -- cgit v1.2.1