[freeside-commits] branch FREESIDE_3_BRANCH updated. 2c23904b0cc9dcd02740b0b7edb980d70d28df1b

Christopher Burger burgerc at freeside.biz
Wed Sep 26 06:36:01 PDT 2018


The branch, FREESIDE_3_BRANCH has been updated
       via  2c23904b0cc9dcd02740b0b7edb980d70d28df1b (commit)
       via  0b3d0d9c60140d487634a947eb1b3d2eb2af91ad (commit)
      from  4fdfe871a80ff796146218fd226e46be97698e0f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2c23904b0cc9dcd02740b0b7edb980d70d28df1b
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Wed Sep 26 09:33:36 2018 -0400

    RT# 75817 - V3 fix for redirect

diff --git a/httemplate/misc/process/change-password.html b/httemplate/misc/process/change-password.html
index 1c746a4e0..61a1a5e16 100644
--- a/httemplate/misc/process/change-password.html
+++ b/httemplate/misc/process/change-password.html
@@ -17,16 +17,8 @@
 %   if ($svcnum) { 
 	 <% $cgi->redirect($fsurl.'view/svc_acct.cgi?'.$cgi->query_string) %>
 %   }
-%   elsif ($contactnum) { 
-%     my $freeside_status = "Contact ".$contact->{'Hash'}->{'first'}." ".$contact->{'Hash'}->{'last'}." password updated.";
-	 <% $cgi->redirect( -uri    => popurl(3). "view/cust_main.cgi?". $cgi->param('custnum'),
-                   -cookie => CGI::Cookie->new(
-                     -name    => 'freeside_status',
-                     -value   => mt($freeside_status),
-                     -expires => '+5m',
-                   ),
-   )
-%>
+%   elsif ($contactnum) {
+      <% $cgi->redirect($fsurl.'view/cust_main.cgi?'.$cgi->param('custnum')) %>
 %   }
 % }
 

commit 0b3d0d9c60140d487634a947eb1b3d2eb2af91ad
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Tue Sep 25 13:19:46 2018 -0400

    RT# 75817 - fixed selecting random password on custmain page

diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index d551c609f..bcca28ca4 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -1966,7 +1966,7 @@ and customer address. Include units.',
   {
     'key'         => 'passwordmin',
     'section'     => 'password',
-    'description' => 'Minimum password length (default 6)',
+    'description' => 'Minimum password length (default 8)',
     'type'        => 'text',
   },
 
diff --git a/httemplate/elements/change_password.html b/httemplate/elements/change_password.html
index 65b7d8502..068d7d73c 100644
--- a/httemplate/elements/change_password.html
+++ b/httemplate/elements/change_password.html
@@ -44,7 +44,8 @@ function <%$pre%>toggle(toggle, clear) {
   if (clear) {
     document.getElementById('<%$pre%>password').value = '';
     document.getElementById('<%$pre%>password_result').innerHTML = '';
-}
+    document.getElementById('<%$change_button_id%>').disabled = true;
+  }
   document.getElementById('<%$pre%>div').style.display =
     toggle ? 'inline-block' : 'none';
 % if (!$opt{'no_label_display'}) {
diff --git a/httemplate/elements/random_pass.html b/httemplate/elements/random_pass.html
index 778aa20e6..3a632b9af 100644
--- a/httemplate/elements/random_pass.html
+++ b/httemplate/elements/random_pass.html
@@ -19,6 +19,7 @@ function <% $id %>randomPass() {
   for(var j, x, i = pass.length; i; j = Math.floor(Math.random() * i), x = pass[--i], pass[i] = pass[j], pass[j] = x);
   pass = pass.join('');
   document.getElementById('<% $id %>').value = pass;
+  document.getElementById('<% $id %>_result').innerHTML = '<IMG SRC="<% $p %>images/tick.png" style="width: 1em; display: inline-block; padding-right: .5em"> <SPAN STYLE="color: green;">Password valid!</SPAN>';
 % if ($submitid) {
     document.getElementById('<% $submitid %>').disabled = false;
 % }
diff --git a/httemplate/misc/process/change-password.html b/httemplate/misc/process/change-password.html
index 37ad6d915..1c746a4e0 100644
--- a/httemplate/misc/process/change-password.html
+++ b/httemplate/misc/process/change-password.html
@@ -18,7 +18,15 @@
 	 <% $cgi->redirect($fsurl.'view/svc_acct.cgi?'.$cgi->query_string) %>
 %   }
 %   elsif ($contactnum) { 
-	 <% $cgi->redirect($fsurl.'view/cust_main.cgi?'.$cgi->param('custnum')) %>
+%     my $freeside_status = "Contact ".$contact->{'Hash'}->{'first'}." ".$contact->{'Hash'}->{'last'}." password updated.";
+	 <% $cgi->redirect( -uri    => popurl(3). "view/cust_main.cgi?". $cgi->param('custnum'),
+                   -cookie => CGI::Cookie->new(
+                     -name    => 'freeside_status',
+                     -value   => mt($freeside_status),
+                     -expires => '+5m',
+                   ),
+   )
+%>
 %   }
 % }
 
@@ -30,6 +38,7 @@
 
 <%init>
 my $curuser = $FS::CurrentUser::CurrentUser;
+my $contact;
 
 $cgi->param('svcnum') =~ /^(\d+)$/ or die "illegal svcnum" if $cgi->param('svcnum');
 my $svcnum = $1;
@@ -65,7 +74,7 @@ if ($svcnum) {
 	$cgi->delete('password');
 }
 elsif ($contactnum) {
-	my $contact = qsearchs('contact', { 'contactnum' => $contactnum } )
+	$contact = qsearchs('contact', { 'contactnum' => $contactnum } )
       or return { 'error' => "Contact not found" . $contactnum };
 
 	$error = $contact->is_password_allowed($newpass)

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Conf.pm                                | 2 +-
 httemplate/elements/change_password.html     | 3 ++-
 httemplate/elements/random_pass.html         | 1 +
 httemplate/misc/process/change-password.html | 7 ++++---
 4 files changed, 8 insertions(+), 5 deletions(-)




More information about the freeside-commits mailing list