diff options
author | Christopher Burger <burgerc@freeside.biz> | 2017-07-06 11:52:22 -0400 |
---|---|---|
committer | Christopher Burger <burgerc@freeside.biz> | 2017-07-06 11:52:22 -0400 |
commit | 59776b97e0d82e30e9a50c76d16f302309fff76d (patch) | |
tree | 40312c609a9e1ff36d759d503ef0948c7e7a3d31 /FS | |
parent | 53427a0d7b74c16d646196e70c95971471e1fae8 (diff) |
RT# 75817 - fixed contact password page to be more consistant with svc password page, updated javascript to check password as you type rather than when you leave the field.
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/contact.pm | 13 | ||||
-rw-r--r-- | FS/FS/cust_contact.pm | 2 |
2 files changed, 12 insertions, 3 deletions
diff --git a/FS/FS/contact.pm b/FS/FS/contact.pm index a873fda47..568d46f07 100644 --- a/FS/FS/contact.pm +++ b/FS/FS/contact.pm @@ -577,6 +577,15 @@ sub replace { } } + if ( $self->get('password') ) { + my $error = $self->is_password_allowed($self->get('password')) + || $self->change_password($self->get('password')); + if ( $error ) { + $dbh->rollback if $oldAutoCommit; + return $error; + } + } + $dbh->commit or die $dbh->errstr if $oldAutoCommit; ''; @@ -663,7 +672,7 @@ and replace methods. sub check { my $self = shift; - if ( $self->selfservice_access eq 'R' ) { + if ( $self->selfservice_access eq 'R' || $self->selfservice_access eq 'P' ) { $self->selfservice_access('Y'); $self->_resend('Y'); } @@ -945,7 +954,7 @@ sub cgi_contact_fields { my @contact_fields = qw( classnum first last title comment emailaddress selfservice_access - invoice_dest + invoice_dest password ); push @contact_fields, 'phonetypenum'. $_->phonetypenum diff --git a/FS/FS/cust_contact.pm b/FS/FS/cust_contact.pm index f0f8bfb69..6820ac4b4 100644 --- a/FS/FS/cust_contact.pm +++ b/FS/FS/cust_contact.pm @@ -106,7 +106,7 @@ and replace methods. sub check { my $self = shift; - if ( $self->selfservice_access eq 'R' ) { + if ( $self->selfservice_access eq 'R' || $self->selfservice_access eq 'P') { $self->selfservice_access('Y'); $self->_resend('Y'); } |