summaryrefslogtreecommitdiff
path: root/FS/FS
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2017-07-06 11:52:22 -0400
committerChristopher Burger <burgerc@freeside.biz>2017-08-18 10:59:30 -0400
commit862e1bf16a977784a73d6b0e413712830de408e6 (patch)
tree9a56e4a922de8e674dcaae6ed5a81e5604e78e32 /FS/FS
parent77baa73413d756538cfb6f10dac71b60604f0184 (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/FS')
-rw-r--r--FS/FS/contact.pm13
-rw-r--r--FS/FS/cust_contact.pm2
2 files changed, 12 insertions, 3 deletions
diff --git a/FS/FS/contact.pm b/FS/FS/contact.pm
index 9c83338..a429c2d 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');
}
@@ -951,7 +960,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 f0f8bfb..6820ac4 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');
}