X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fcontact.html;h=e330e1feac29a3811e78e02d7638813e443c1ca7;hb=405f925e2578705780332900eb5df031bfa7c272;hp=779905234381c54dd209e8ce822fd80bd97f9eb7;hpb=6016bc83d369186275044bd8539f66a3cb03c4cb;p=freeside.git diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html index 779905234..e330e1fea 100644 --- a/httemplate/elements/contact.html +++ b/httemplate/elements/contact.html @@ -40,24 +40,64 @@ % } % } elsif ( $field eq 'emailaddress' ) { % $value = join(', ', map $_->emailaddress, $contact->contact_email); +% } elsif ( $field eq 'password' ) { +% $value = $contact->get('_password') ? '********' : ''; % } else { % $value = $contact->get($field); % } % if ( $field eq 'selfservice_access' ) { + - +% #password form +% } elsif ( $field eq 'password') { + +% my $contactnum = $curr_value ? $curr_value : '0'; + + + + +% } elsif ( $field eq 'invoice_dest' ) { +% my $curr_value = $cgi->param($name . '_' . $field); +% $curr_value = $value if !defined($curr_value); + <& select.html, + field => $name . '_' . $field, + curr_value => $curr_value, + options => [ '', 'Y' ], + option_labels => { '' => 'no', 'Y' => 'yes' }, + style => 'width: 100%', + &> % } else { <% $label{$field} %> - -% } -% my $pwd_change_label = 'change password'; -% $pwd_change_label = 'setup password' unless $contact->_password; -% if ($curr_value) { - - - <& /elements/change_password.html, - 'contact_num' => $curr_value, - 'custnum' => $opt{'custnum'}, - 'curr_value' => '', - 'label' => $pwd_change_label, - &> - -
- Password +% if ( $field eq 'password' ) { +
+% } % } @@ -97,6 +124,7 @@ my( %opt ) = @_; my $conf = new FS::Conf; + my $self_base_url = $conf->config('selfservice_server-base_url'); my $name = $opt{'element_name'} || $opt{'field'} || 'contactnum'; @@ -132,6 +160,11 @@ tie my %label, 'Tie::IxHash', 'selfservice_access' => 'Self-service' ; +unless ($opt{'for_prospect'}) { + $label{'selfservice_access'} = 'Self-service'; + $label{'password'} = 'Password'; +} + my $first = 0; foreach my $phone_type ( qsearch({table=>'phone_type', order_by=>'weight'}) ) { next if $phone_type->typename =~ /^(Home|Fax)$/;