[freeside-commits] freeside/httemplate/edit/elements edit.html, 1.39.2.4, 1.39.2.5

Ivan,,, ivan at wavetail.420.am
Wed Apr 7 01:15:59 PDT 2010


Update of /home/cvs/cvsroot/freeside/httemplate/edit/elements
In directory wavetail.420.am:/tmp/cvs-serv23614/edit/elements

Modified Files:
      Tag: FREESIDE_1_9_BRANCH
	edit.html 
Log Message:
in employee edit, fix form getting submitted before customer search can complete.  throws "status connecting to" error and custnum does not get filled in, RT#8014

Index: edit.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/elements/edit.html,v
retrieving revision 1.39.2.4
retrieving revision 1.39.2.5
diff -u -w -d -r1.39.2.4 -r1.39.2.5
--- edit.html	12 Mar 2010 03:36:47 -0000	1.39.2.4
+++ edit.html	7 Apr 2010 08:15:57 -0000	1.39.2.5
@@ -127,6 +127,9 @@
                            "html_string";
                          },
     
+    #javascript function name, will be called with form name as arg
+    'onsubmit'   => 'check_form_data',
+
     #at the very bottom (well, as low as you can go from here)
     'html_foot'  => '',
 
@@ -199,7 +202,11 @@
 
 % my $url = $opt{'post_url'} || popurl(1)."process/$table.html";
 
-<FORM ACTION="<% $url %>" METHOD=POST NAME="edit_topform">
+<FORM NAME   = "edit_topform"
+      METHOD = POST
+      ACTION = "<% $url %>"
+      <% $opt{onsubmit} ? 'onSubmit="return '.$opt{onsubmit}.'(this)"' : '' %>
+>
 
 <INPUT TYPE="hidden" NAME="svcdb" VALUE="<% $table %>">
 <INPUT TYPE="hidden" NAME="<% $pkey %>" VALUE="<% $clone ? '' : $object->$pkey() %>">
@@ -691,7 +698,13 @@
 
 <BR>
 
-<INPUT TYPE="submit" ID="submit" VALUE="<% ( !$clone && $object->$pkey() ) ? "Apply changes" : "Add ". ( $opt{'name'} || $opt{'name_singular'} ) %>">
+<INPUT TYPE     = "submit"
+       ID       = "submit"
+       VALUE    = "<% ( !$clone && $object->$pkey() )
+                        ? "Apply changes"
+                        : "Add ". ( $opt{'name'} || $opt{'name_singular'} )
+                   %>"
+>
 
 </FORM>
 



More information about the freeside-commits mailing list