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/misc/process/change-password.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'httemplate/misc') 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 2f4eb8cfbb07170dff09474e84adbf1c87284620 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Fri, 13 Nov 2015 14:28:34 -0800 Subject: point all links to browse/reason_type.html instead of reason.html, cleanup from #38532 --- httemplate/misc/cust_credit-import.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/misc') diff --git a/httemplate/misc/cust_credit-import.html b/httemplate/misc/cust_credit-import.html index 9a63a04c5..937010dd6 100644 --- a/httemplate/misc/cust_credit-import.html +++ b/httemplate/misc/cust_credit-import.html @@ -69,7 +69,7 @@ Field information:

-- cgit v1.2.1 From 087c45b52363e519320eef20482ca94a7a8fb5f0 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Fri, 13 Nov 2015 17:46:33 -0600 Subject: RT#17480: Freeside Cancel Reason [missing file] --- httemplate/misc/reason-merge.html | 79 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 httemplate/misc/reason-merge.html (limited to 'httemplate/misc') diff --git a/httemplate/misc/reason-merge.html b/httemplate/misc/reason-merge.html new file mode 100644 index 000000000..a531e582c --- /dev/null +++ b/httemplate/misc/reason-merge.html @@ -0,0 +1,79 @@ +% if ($success) { +<% include('/elements/header-popup.html', 'Reason Merge Success') %> + +% } else { +<% include('/elements/header-popup.html', 'Merge Reasons') %> +% if ($error) { +

<% emt($error) %>

+% } +% if (@reasons > 1) { +

+The following reasons will be merged into one. +Please select one reason to merge the others into. +

+
"> +

+% foreach my $reason (@reasons) { + + +<% $reason->reason %>
+% } +

+

Caution: merging reasons cannot be undone!

+

+
+% } else { + +% } +% } + +<%init> +my @reasonnums = $cgi->param('reasonnum'); +my $destreasonnum = $cgi->param('destreasonnum'); + +my $error; +my $class; +my @reasons; +my $destreason; +foreach my $reasonnum (@reasonnums) { + unless ($reasonnum =~ /^\d+$/) { + $error = "Invalid reasonnum $reasonnum."; + last; + } + my $reason = qsearchs('reason',{ 'reasonnum' => $reasonnum }); + unless ($reason) { + $error = "Reason $reasonnum could not be loaded."; + last; + } + my $reasontype = $reason->reasontype; + $class ||= $reasontype->class; + if ($class ne $reasontype->class) { + $error = "Selected reasons must have the same reason type class."; + last; + } + push(@reasons, $reason); + $destreason = $reason if $reasonnum eq $destreasonnum; +} + +unless ($error) { + $error = "No reasons selected." unless @reasons; + $error = "Select two or more reasons to merge." unless @reasons > 1; +} + +@reasons = () if $error; + +my $success = 0; +if ($cgi->param('process_merge') && !$error) { + if ($destreason) { + $error = $destreason->merge(\@reasons); + $success = 1 unless $error; + } else { + $error = "No desitation reason selected."; + } +} + + -- cgit v1.2.1 From c0886229d19cfa798580fbeb342826fd11ceeeb0 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Mon, 16 Nov 2015 19:32:09 -0600 Subject: RT#17480: Freeside Cancel Reason [small fixes] --- httemplate/misc/reason-merge.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'httemplate/misc') diff --git a/httemplate/misc/reason-merge.html b/httemplate/misc/reason-merge.html index a531e582c..14f5ebb84 100644 --- a/httemplate/misc/reason-merge.html +++ b/httemplate/misc/reason-merge.html @@ -1,9 +1,7 @@ % if ($success) { <% include('/elements/header-popup.html', 'Reason Merge Success') %> % } else { <% include('/elements/header-popup.html', 'Merge Reasons') %> @@ -72,7 +70,7 @@ if ($cgi->param('process_merge') && !$error) { $error = $destreason->merge(\@reasons); $success = 1 unless $error; } else { - $error = "No desitation reason selected."; + $error = "No destination reason selected."; } } -- cgit v1.2.1