[freeside-commits] freeside/httemplate/edit/elements edit.html, 1.46, 1.47
Ivan,,,
ivan at wavetail.420.am
Wed Apr 7 01:15:57 PDT 2010
Update of /home/cvs/cvsroot/freeside/httemplate/edit/elements
In directory wavetail.420.am:/tmp/cvs-serv23605/edit/elements
Modified Files:
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.46
retrieving revision 1.47
diff -u -w -d -r1.46 -r1.47
--- edit.html 12 Mar 2010 03:36:36 -0000 1.46
+++ edit.html 7 Apr 2010 08:15:55 -0000 1.47
@@ -129,6 +129,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' => '',
@@ -201,7 +204,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() %>">
@@ -699,7 +706,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