X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fcontact.html;h=308b846bcea9e28bfd87049fa427174a1e73f775;hb=5b9562f8e03ae6efea0c2eaa90341083744fa529;hp=31b4e49cbb9354f4458d9e94ff3bb55caba22369;hpb=1f1cc2da8ffcd4d27e3ae8a79268d688e0c5c519;p=freeside.git diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html index 31b4e49cb..308b846bc 100644 --- a/httemplate/elements/contact.html +++ b/httemplate/elements/contact.html @@ -46,7 +46,8 @@ % $value = $contact->get('_password') ? '********' : ''; % } elsif ( $field eq 'selfservice_access' % or $field eq 'comment' -% or $field eq 'invoice_dest' ) { +% or $field eq 'invoice_dest' +% or $field eq 'message_dest' ) { % $value = $X_contact->get($field); % } else { % $value = $contact->get($field); @@ -79,7 +80,7 @@ -% } elsif ( $field eq 'invoice_dest' ) { +% } elsif ( $field eq 'invoice_dest' || $field eq 'message_dest' ) { % my $curr_value = $cgi->param($name . '_' . $field); % $curr_value = $value if !defined($curr_value); <& select.html, @@ -173,12 +174,13 @@ tie my %label, 'Tie::IxHash', unless ($opt{'for_prospect'}) { $label{'invoice_dest'} = 'Send invoices'; + $label{'message_dest'} = 'Send messages'; $label{'selfservice_access'} = 'Self-service'; $label{'password'} = 'Password'; } my $first = 0; -foreach my $phone_type ( qsearch({table=>'phone_type', order_by=>'weight'}) ) { +foreach my $phone_type ( FS::phone_type->get_phone_types() ) { next if $phone_type->typename =~ /^(Home|Fax)$/; my $f = 'phonetypenum'.$phone_type->phonetypenum; $label{$f} = $phone_type->typename. ' phone'; @@ -189,8 +191,10 @@ $label{'comment'} = 'Comment'; my @fields = $opt{'name_only'} ? qw( first last ) : keys %label; +my $submitid = $opt{'submit_id'} ? $opt{'submit_id'} : 'submit'; + my $js = qq( - add_password_validation('changepw$id\_password', 'submit', '', '$contactnum'); + add_password_validation('changepw$id\_password', '$submitid', '', '$contactnum'); var selfService = document.getElementById("$id\_selfservice_access").value; @@ -202,6 +206,6 @@ my $js = qq( else { document.getElementById("changepw$id\_password").disabled = 'true'; } return false; } -); +) unless $opt{'for_prospect'};