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%>form" CLASS="passwordbox">
15 % if (!$opt{'noformtag'}) {
16 <FORM METHOD="POST" ACTION="<%$fsurl%>misc/process/change-password.html" onsubmit="return 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 % if ($opt{'contact_num'}) {
48 document.getElementById('<% $opt{'pre_pwd_field_label'} %>selfservice_access').value = 'Y';
51 document.getElementById('<%$pre%>form').style.display =
52 toggle ? 'inline-block' : 'none';
53 % if (!$opt{'no_label_display'}) {
54 document.getElementById('<%$pre%>link').style.display =
55 toggle ? 'none' : 'inline';
59 function checkPasswordValidation() {
60 var validationResult = document.getElementById('<%$pre%>password_result').innerHTML;
61 if (validationResult.match(/Password valid!/)) {
72 my $curr_value = $opt{'curr_value'} || '';
73 my $change_title = $opt{'label'} || 'change';
75 my $change_id_input = '';
78 if ($opt{'svc_acct'}) {
79 my $svc_acct = $opt{'svc_acct'};
80 $change_id_input = '<INPUT TYPE="hidden" NAME="'.$opt{'pre_pwd_field_label'}.'svcnum" VALUE="' . $svc_acct->svcnum . '">';
81 $pre .= $svc_acct->svcnum . '_';
82 $svcnum = $svc_acct->svcnum;
84 elsif ($opt{'contact_num'}) {
86 <INPUT TYPE="hidden" NAME="'.$opt{'pre_pwd_field_label'}.'contactnum" VALUE="' . $opt{'contact_num'} . '">
87 <INPUT TYPE="hidden" NAME="'.$opt{'pre_pwd_field_label'}.'custnum" VALUE="' . $opt{'custnum'} . '">
89 $pre .= $opt{'pre_pwd_field_label'};
92 my $change_button_id = $pre.'change_button';
94 my $error = $cgi->param($pre.'error');