summaryrefslogtreecommitdiff
path: root/httemplate/elements/change_password.html
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2017-09-12 12:08:41 -0400
committerChristopher Burger <burgerc@freeside.biz>2017-09-12 12:08:41 -0400
commit998b32d356338772484814a477d9efb159206b8d (patch)
treef93eebad83be0b899d8c37336d25b9eac80bf0b8 /httemplate/elements/change_password.html
parent23f29deffa1fc6bc1a7b904c80f71db2d76dc26e (diff)
RT# 77504 - Fixed error display issue, and javascript to prevent error.
Diffstat (limited to 'httemplate/elements/change_password.html')
-rw-r--r--httemplate/elements/change_password.html15
1 files changed, 11 insertions, 4 deletions
diff --git a/httemplate/elements/change_password.html b/httemplate/elements/change_password.html
index 463384f2f..7d95e19dc 100644
--- a/httemplate/elements/change_password.html
+++ b/httemplate/elements/change_password.html
@@ -13,7 +13,7 @@
% }
<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 %>
@@ -33,9 +33,6 @@
'contactnum' => $opt{'contact_num'},
'submitid' => $change_button_id,
&>
-% if ( $error ) {
- <BR><SPAN STYLE="color: #ff0000"><% $error |h %></SPAN>
-% }
% if (!$opt{'noformtag'}) {
</FORM>
@@ -58,6 +55,16 @@ function <%$pre%>toggle(toggle, clear) {
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 = @_;