[freeside-commits] branch master updated. 8fe6c833babe44bb707b8c47273b04fe39edfbaf
Christopher Burger
burgerc at freeside.biz
Fri Sep 28 07:01:19 PDT 2018
The branch, master has been updated
via 8fe6c833babe44bb707b8c47273b04fe39edfbaf (commit)
via 9e9168c1e83f5e33e3a09299a3e72d0d9ae7a237 (commit)
from 188400e69d8d95f73ca5ab7be89254617270dd75 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8fe6c833babe44bb707b8c47273b04fe39edfbaf
Merge: 9e9168c1e 188400e69
Author: Christopher Burger <burgerc at freeside.biz>
Date: Fri Sep 28 09:58:50 2018 -0400
Merge branch 'master' of ssh://git.freeside.biz/home/git/freeside
commit 9e9168c1e83f5e33e3a09299a3e72d0d9ae7a237
Author: Christopher Burger <burgerc at freeside.biz>
Date: Fri Sep 28 09:57:14 2018 -0400
RT# 75817 - fixed issue with contact edit on edit customer page
diff --git a/httemplate/edit/cust_main-contacts.html b/httemplate/edit/cust_main-contacts.html
index abef7505d..317257b3b 100644
--- a/httemplate/edit/cust_main-contacts.html
+++ b/httemplate/edit/cust_main-contacts.html
@@ -24,6 +24,7 @@ this one isn't being maintained well. :/
'table' => 'cust_main',
'post_url' => popurl(1). 'process/cust_main-contacts.html',
'no_pkey_display' => 1,
+ 'submit_id' => 'submit',
'labels' => {
'contactnum' => ' ', #'Contact',
#'locationnum' => ' ',
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi
index 56c396271..3cc55f348 100755
--- a/httemplate/edit/cust_main.cgi
+++ b/httemplate/edit/cust_main.cgi
@@ -111,7 +111,7 @@ function samechanged(what) {
</SCRIPT>
-<& cust_main/contacts_new.html, 'cust_main'=>$cust_main, &>
+<& cust_main/contacts_new.html, 'cust_main'=>$cust_main, 'submit_id'=>'submitButton', &>
%# billing info
<& cust_main/billing.html, $cust_main,
diff --git a/httemplate/edit/cust_main/contacts_new.html b/httemplate/edit/cust_main/contacts_new.html
index 1171e7df4..90314258d 100644
--- a/httemplate/edit/cust_main/contacts_new.html
+++ b/httemplate/edit/cust_main/contacts_new.html
@@ -1,3 +1,17 @@
+<SCRIPT>
+ function checkPasswordValidation(fieldid) {
+ var validationResult = document.getElementById(fieldid+'_result').innerHTML;
+ if (validationResult.match(/Password valid!/)) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+</SCRIPT>
+
+<& '/elements/validate_password_js.html', &>
+
<DIV ID="contacts_div" STYLE="display:<% $display %>">
<BR>
<FONT CLASS="fsinnerbox-title">Contacts</FONT>
@@ -5,6 +19,7 @@
'embed' => $opt{cust_main},
'table' => 'cust_main',
'agent_virt' => 1,
+ 'submit_id' => $opt{submit_id},
'html_table_class' => 'fsinnerbox',
'labels' => { 'contactnum' => '', #'Contact',
#'locationnum' => ' ',
diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html
index b7f2e7adb..1d472099b 100644
--- a/httemplate/edit/elements/edit.html
+++ b/httemplate/edit/elements/edit.html
@@ -114,6 +114,9 @@ Example:
#we're in a popup (no title/menu/searchboxes)
'popup' => 1,
+ #if you need to access the submit button
+ 'submit_id' => 'mysubmitbuttonid',
+
#we're embedded (rows only: no header at all, no html_init, no error
# display, no <FORM>, no hidden fields for table name or primary key, no
# display of primary key, no submit button, no html_foot, no footer)
@@ -398,6 +401,8 @@ Example:
%
% my $layer_prefix_on = '';
%
+% my $submitid = $opt{submit_id} ? $opt{submit_id} : '';
+%
% my $include_sub = sub {
% my %opt = @_;
%
@@ -422,6 +427,7 @@ Example:
% 'field' => "$field$fieldnum",
% 'id' => "$field$fieldnum", #separate?
% 'label_id' => $field."_label$fieldnum", #don't want field0_label0...
+% 'submit_id' => $submitid,
% %include_common,
% %opt,
% );
diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html
index 909ff7893..48b5e2ce2 100644
--- a/httemplate/elements/contact.html
+++ b/httemplate/elements/contact.html
@@ -191,8 +191,10 @@ $label{'comment'} = 'Comment';
my @fields = $opt{'name_only'} ? qw( first last ) : keys %label;
+my $submitid = $opt{'submit_id'} ? $opt{'submit_id'} : 'submit';
+
my $js = qq(
- add_password_validation('changepw$id\_password', 'submit', '', '$contactnum');
+ add_password_validation('changepw$id\_password', '$submitid', '', '$contactnum');
var selfService = document.getElementById("$id\_selfservice_access").value;
-----------------------------------------------------------------------
Summary of changes:
httemplate/edit/cust_main-contacts.html | 1 +
httemplate/edit/cust_main.cgi | 2 +-
httemplate/edit/cust_main/contacts_new.html | 15 +++++++++++++++
httemplate/edit/elements/edit.html | 6 ++++++
httemplate/elements/contact.html | 4 +++-
5 files changed, 26 insertions(+), 2 deletions(-)
More information about the freeside-commits
mailing list