3 border: 1px solid #7e0079;
7 background-color: #ffffff;
11 % if (!$opt{'no_label_display'}) {
12 <A ID="<%$pre%>link" HREF="javascript:void(0)" onclick="<%$pre%>toggle(true)">(<% emt( $change_title ) %>)</A>
14 <DIV ID="<%$pre%>div" CLASS="passwordbox">
15 % if (!$opt{'noformtag'}) {
16 <FORM ID="<%$pre%>form" METHOD="POST" ACTION="<%$fsurl%>misc/process/change-password.html" onsubmit="return <%$pre%>checkPasswordValidation()">
19 <% $change_id_input %>
20 <INPUT TYPE="text" ID="<%$pre%>password" NAME="<% $opt{'pre_pwd_field_label'} %>password" VALUE="<% $curr_value |h%>">
21 <& /elements/random_pass.html, $pre.'password', 'randomize', $change_button_id &>
22 % if (!$opt{'noformtag'}) {
23 <INPUT TYPE="submit" ID="<%$change_button_id%>" VALUE="change" disabled="disabled">
25 <INPUT TYPE="button" ID="<%$change_button_id%>" VALUE="change" onclick="<%$pre%>toggle(false)" disabled="disabled">
27 <INPUT TYPE="button" ID="<%$pre%>cancel_button" VALUE="cancel" onclick="<%$pre%>toggle(false, true)">
29 <DIV ID="<%$pre%>password_result" STYLE="font-size: smaller"></DIV>
30 <& '/elements/validate_password.html',
31 'fieldid' => $pre.'password',
33 'contactnum' => $opt{'contact_num'},
34 'submitid' => $change_button_id,
37 % if (!$opt{'noformtag'}) {
42 <SCRIPT TYPE="text/javascript">
43 function <%$pre%>toggle(toggle, clear) {
45 document.getElementById('<%$pre%>password').value = '';
46 document.getElementById('<%$pre%>password_result').innerHTML = '';
47 document.getElementById('<%$change_button_id%>').disabled = true;
49 document.getElementById('<%$pre%>div').style.display =
50 toggle ? 'inline-block' : 'none';
51 % if (!$opt{'no_label_display'}) {
52 document.getElementById('<%$pre%>link').style.display =
53 toggle ? 'none' : 'inline';
57 function <%$pre%>checkPasswordValidation(resultId) {
58 var validationResult = document.getElementById('<%$pre%>password_result').innerHTML;
59 if (validationResult.match(/Password valid!/)) {
70 my $curr_value = $opt{'curr_value'} || '';
71 my $change_title = $opt{'label'} || 'change';
73 my $change_id_input = '';
76 if ($opt{'svc_acct'}) {
77 my $svc_acct = $opt{'svc_acct'};
78 $change_id_input = '<INPUT TYPE="hidden" NAME="'.$opt{'pre_pwd_field_label'}.'svcnum" VALUE="' . $svc_acct->svcnum . '">';
79 $pre .= $svc_acct->svcnum . '_';
80 $svcnum = $svc_acct->svcnum;
82 elsif ($opt{'contact_num'}) {
84 <INPUT TYPE="hidden" NAME="contactnum" VALUE="' . $opt{'contact_num'} . '">
85 <INPUT TYPE="hidden" NAME="custnum" VALUE="' . $opt{'custnum'} . '">
87 $pre .= $opt{'pre_pwd_field_label'};
90 my $change_button_id = $pre.'change_button';
92 my $error = $cgi->param($pre.'error');