X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fchange_password.html;h=068d7d73ce129058577d5c4bdd8d7154f4e00088;hp=625ba1fb5d8e1b4faac33993feebf2d2349cfff7;hb=7b0bbc4117a7959b9f7b7b2cf999b8188ba34160;hpb=942431fdcb3803b7ef98b1be8c4dc188e1a4b5aa diff --git a/httemplate/elements/change_password.html b/httemplate/elements/change_password.html index 625ba1fb5..068d7d73c 100644 --- a/httemplate/elements/change_password.html +++ b/httemplate/elements/change_password.html @@ -8,34 +8,86 @@ display: none; } -(<% mt('change') %>) -
-
- - - <& /elements/random_pass.html, $pre.'password', 'randomize' &> - - -% if ( $error ) { -
<% $error |h %> +% if (!$opt{'no_label_display'}) { +(<% emt( $change_title ) %>) % } +
+% if (!$opt{'noformtag'}) { + +% } + + <% $change_id_input %> + + <& /elements/random_pass.html, $pre.'password', 'randomize', $change_button_id &> +% if (!$opt{'noformtag'}) { + +% } else { + +%} + + +
+ <& '/elements/validate_password.html', + 'fieldid' => $pre.'password', + 'svcnum' => $svcnum, + 'contactnum' => $opt{'contact_num'}, + 'submitid' => $change_button_id, + &> + +% if (!$opt{'noformtag'}) { +% } +
<%init> my %opt = @_; -my $svc_acct = $opt{'svc_acct'}; + 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{'pre_pwd_field_label'}; +} + +my $change_button_id = $pre.'change_button'; + + my $error = $cgi->param($pre.'error');