From 8ca45ec1f1ab960ee1e262ee764f05d214728d05 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 4 Sep 2018 08:30:35 -0400 Subject: RT# 75817 - Added password change link to cust main page --- httemplate/elements/contact.html | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'httemplate/elements/contact.html') diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html index 7b6c853d4..5588890c8 100644 --- a/httemplate/elements/contact.html +++ b/httemplate/elements/contact.html @@ -76,12 +76,10 @@ placeholder = "<% $value |h %>" > % my $contactnum = $curr_value ? $curr_value : '0'; - <& '/elements/validate_password.html', - 'fieldid' => "changepw".$id."_password", - 'svcnum' => '', - 'contactnum' => $contactnum, - 'submitid' => "submit", - &> + + - - % } elsif ( $field eq 'invoice_dest' || $field eq 'message_dest' ) { % my $curr_value = $cgi->param($name . '_' . $field); @@ -136,6 +123,7 @@ my $name = $opt{'element_name'} || $opt{'field'} || 'contactnum'; my $id = $opt{'id'} || 'contactnum'; my $curr_value = $opt{'curr_value'} || $opt{'value'}; +my $contactnum = $curr_value ? $curr_value : '0'; my $onchange = ''; if ( $opt{'onchange'} ) { @@ -203,4 +191,19 @@ $label{'comment'} = 'Comment'; my @fields = $opt{'name_only'} ? qw( first last ) : keys %label; +my $js = qq( + add_password_validation('changepw$id\_password', 'submit', '', '$contactnum'); + + var selfService = document.getElementById("$id\_selfservice_access").value; + + if (selfService !== "Y") { document.getElementById("changepw$id\_password").disabled = 'true'; } + document.getElementById("$id\_selfservice_access").onchange = function() { + if (this.value == "P" || this.value == "E" || this.value =="Y") { + document.getElementById("changepw$id\_password").disabled = ''; + } + else { document.getElementById("changepw$id\_password").disabled = 'true'; } + return false; + } +); + -- cgit v1.2.1 From 40062272379e4c32add419f839da60742719da2d Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Sun, 9 Sep 2018 16:12:23 -0400 Subject: RT# 75817 - cleaned up password validation error message --- httemplate/elements/contact.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/elements/contact.html') diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html index 5fa8ae485..909ff7893 100644 --- a/httemplate/elements/contact.html +++ b/httemplate/elements/contact.html @@ -103,7 +103,7 @@
<% $label{$field} %> % if ( $field eq 'password' ) { -
+
% } % } -- cgit v1.2.1