X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fchange_password.html;h=a8cc883b9eb5276bd2e35690752b44a34ee22afb;hb=ec479b83db152b2658e99901e03d29d2a458acb9;hp=625ba1fb5d8e1b4faac33993feebf2d2349cfff7;hpb=54a357b171aa44f9399b4c146acd2afd3b686075;p=freeside.git diff --git a/httemplate/elements/change_password.html b/httemplate/elements/change_password.html index 625ba1fb5..a8cc883b9 100644 --- a/httemplate/elements/change_password.html +++ b/httemplate/elements/change_password.html @@ -8,14 +8,25 @@ display: none; } -(<% mt('change') %>) +(<% emt( $change_title ) %>)
- + <% $change_id_input %> <& /elements/random_pass.html, $pre.'password', 'randomize' &> - +% if ($opt{'popup'}) { + +% } +% else { + +%} +
+ <& '/elements/validate_password.html', + 'fieldid' => $pre.'password', + 'svcnum' => $svcnum, + 'contactnum' => $contactnum, + &> % if ( $error ) {
<% $error |h %> % } @@ -28,14 +39,38 @@ function <%$pre%>toggle(val) { document.getElementById('<%$pre%>link').style.display = val ? 'none' : 'inline'; } -% if ( $error ) { +% if ( $error || $opt{'popup'} ) { <%$pre%>toggle(true); % } <%init> my %opt = @_; -my $svc_acct = $opt{'svc_acct'}; + +my $contactnum = $opt{'contact_num'}; my $curr_value = $opt{'curr_value'} || ''; -my $pre = 'changepw'.$svc_acct->svcnum.'_'; -my $error = $cgi->param($pre.'error'); +my $change_title = $opt{'label'} || 'change'; + +my $svcnum; +my $change_id_input = ''; +my $pre = 'changepw'; + +if ($opt{'svc_acct'}) { + my $svc_acct = $opt{'svc_acct'}; + $change_id_input = ''; + $pre .= $svc_acct->svcnum . '_'; + $svcnum = $svc_acct->svcnum; +} +elsif ($opt{'contact_num'}) { + $change_id_input = ' + + + '; + $pre .= $opt{'contact_num'} . '_'; +} + +if ($opt{'popup'}) { + $change_id_input .= ''; +} + + my $error = $cgi->param($pre.'error');