From b6e36782e425e116b976523e18825f9d6e4d18cb Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 7 Apr 2010 08:15:57 +0000 Subject: 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 --- httemplate/edit/access_user.html | 13 +++++++++++++ httemplate/edit/elements/edit.html | 17 +++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/access_user.html b/httemplate/edit/access_user.html index 1f52b4789..cbced75b1 100644 --- a/httemplate/edit/access_user.html +++ b/httemplate/edit/access_user.html @@ -42,6 +42,8 @@ '' ; }, + 'onsubmit' => 'check_user_custnum_search', + 'html_foot' => $check_user_custnum_search, ) %> <%init> @@ -49,4 +51,15 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); +my $check_user_custnum_search = < + function check_user_custnum_search(what) { + while ( user_custnum_search_active ) { + // javascript needs ambien + } + return true; + } + +END + diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html index 1a1023cbd..ea9580df2 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -127,6 +127,9 @@ Example: "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 @@ Example: % my $url = $opt{'post_url'} || popurl(1)."process/$table.html"; -
+ +> @@ -691,7 +698,13 @@ Example:
-"> +" +>
-- cgit v1.2.1