From 0a91d21fcf8ebeb12cd71230d79153c1fa0d82a3 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 12 Sep 2017 12:08:41 -0400 Subject: [PATCH] RT# 77504 - Fixed error display issue, and javascript to prevent error. --- httemplate/elements/change_password.html | 15 +++++++++++---- httemplate/elements/validate_password.html | 9 +++++++++ httemplate/misc/process/change-password.html | 5 +++-- httemplate/view/svc_acct.cgi | 3 ++- 4 files changed, 25 insertions(+), 7 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 @@ % }
% if (!$opt{'noformtag'}) { -
+ % } <% $change_id_input %> @@ -33,9 +33,6 @@ 'contactnum' => $opt{'contact_num'}, 'submitid' => $change_button_id, &> -% if ( $error ) { -
<% $error |h %> -% } % if (!$opt{'noformtag'}) {
@@ -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; + } +} <%init> my %opt = @_; diff --git a/httemplate/elements/validate_password.html b/httemplate/elements/validate_password.html index 1b0688e3c..8c8cf4279 100644 --- a/httemplate/elements/validate_password.html +++ b/httemplate/elements/validate_password.html @@ -23,6 +23,15 @@ should be the input id plus '_result'.