[freeside-commits] branch FREESIDE_3_BRANCH updated. 088d455c563ca3b75be357727622d968e49b3ed1

Christopher Burger burgerc at freeside.biz
Fri Sep 28 18:25:51 PDT 2018


The branch, FREESIDE_3_BRANCH has been updated
       via  088d455c563ca3b75be357727622d968e49b3ed1 (commit)
      from  d2e995622cff5402cd887abad948a986a3ceba82 (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 088d455c563ca3b75be357727622d968e49b3ed1
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
    
    Conflicts:
            httemplate/edit/cust_main-contacts.html
            httemplate/edit/cust_main.cgi
            httemplate/edit/cust_main/contacts_new.html

diff --git a/httemplate/edit/cust_main-contacts.html b/httemplate/edit/cust_main-contacts.html
index b046c5b18..27cea9d3a 100644
--- a/httemplate/edit/cust_main-contacts.html
+++ b/httemplate/edit/cust_main-contacts.html
@@ -17,6 +17,7 @@
      'table'            => 'cust_main',
      'post_url'         => popurl(1). 'process/cust_main-contacts.html',
      'no_pkey_display'  => 1,
+     'submit_id'        => 'submit',
      'labels'           => { 'custnum'     => ' ', #XXX supress this line entirely, its being redundant
                              'contactnum'  => ' ', #'Contact',
                              #'locationnum' => ' ',
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi
index 7c0eb4d58..706435af1 100755
--- a/httemplate/edit/cust_main.cgi
+++ b/httemplate/edit/cust_main.cgi
@@ -117,9 +117,7 @@ samechanged(document.getElementById('same'));
 
 <BR>
 
-<& 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 cbeb1e97a..120f3af28 100644
--- a/httemplate/edit/cust_main/contacts_new.html
+++ b/httemplate/edit/cust_main/contacts_new.html
@@ -1,9 +1,25 @@
+<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>
 <% include('/edit/elements/edit.html',
      'embed'           => $opt{cust_main},
      'table'           => 'cust_main',
+     'agent_virt'       => 1,
+     'submit_id'        => $opt{submit_id},
      'labels'          => { 'contactnum'  => 'Contact',
                             #'locationnum' => ' ',
                           },
@@ -17,7 +33,6 @@
          'm2_error_callback' => $m2_error_callback,
        },
      ],
-     'agent_virt'      => 1,
     )
 %>
 </DIV>
diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html
index ff1da4945..a238a3f04 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)
@@ -371,6 +374,8 @@ Example:
 %
 %   my $layer_prefix_on = '';
 %
+%   my $submitid   = $opt{submit_id} ? $opt{submit_id} : '';
+%
 %   my $include_sub = sub {
 %     my %opt = @_;
 %
@@ -395,6 +400,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 fef189e0c..199f5cb53 100644
--- a/httemplate/elements/contact.html
+++ b/httemplate/elements/contact.html
@@ -165,8 +165,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               |  4 +---
 httemplate/edit/cust_main/contacts_new.html | 17 ++++++++++++++++-
 httemplate/edit/elements/edit.html          |  6 ++++++
 httemplate/elements/contact.html            |  4 +++-
 5 files changed, 27 insertions(+), 5 deletions(-)




More information about the freeside-commits mailing list