% }
<DIV ID="<%$pre%>form" CLASS="passwordbox">
% if (!$opt{'noformtag'}) {
- <FORM METHOD="POST" ACTION="<%$fsurl%>misc/process/change-password.html">
+ <FORM METHOD="POST" ACTION="<%$fsurl%>misc/process/change-password.html" onsubmit="return checkPasswordValidation()">
% }
<% $change_id_input %>
'contactnum' => $opt{'contact_num'},
'submitid' => $change_button_id,
&>
-% if ( $error ) {
- <BR><SPAN STYLE="color: #ff0000"><% $error |h %></SPAN>
-% }
% if (!$opt{'noformtag'}) {
</FORM>
toggle ? 'none' : 'inline';
% }
}
+
+function checkPasswordValidation() {
+ var validationResult = document.getElementById('<%$pre%>password_result').innerHTML;
+ if (validationResult.match(/Password valid!/)) {
+ return true;
+ }
+ else {
+ return false;
+ }
+}
</SCRIPT>
<%init>
my %opt = @_;