From: Joe Hunt Date: Thu, 5 Jan 2012 10:38:07 +0000 (+0100) Subject: Fixed a small bug in graphics editkeys (when search lists are enabled) X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=c7863c71d0ea360d7b4d4e923841b7febd629100;p=fa-stable.git Fixed a small bug in graphics editkeys (when search lists are enabled) --- diff --git a/includes/ui/ui_lists.inc b/includes/ui/ui_lists.inc index df6e4b17..1a1e658b 100644 --- a/includes/ui/ui_lists.inc +++ b/includes/ui/ui_lists.inc @@ -429,7 +429,14 @@ function add_edit_combo($combo_name,$url,$key_param='',$restrict_pages='') $key_param = ((strpos($url,'?')) ? '&' : '?') . $key_param; } - $return_url = ($key_param) ? "Add/Edit" : "Add/Edit"; + $href1 = "href='$url${key_param}='"; + $href2 = "href='$url${key_param}'"; + $onclick1 = "onclick=\"javascript:var sel=(document.forms[0].$combo_name.selectedIndex == -1 ? '' : document.forms[0].$combo_name.options[document.forms[0].$combo_name.selectedIndex].value);openWindow(this.href+sel,this.target); return false;\""; + $onclick2 = "onclick=\"javascript:openWindow(this.href,this.target); return false;\""; + $img = "Add/Edit"; + $return_url = ($key_param) ? + "$img" : + "$img"; // Don't pass edit button code If restrict_pages contains instructions but fails security check if ($restrict_pages && strpos($restrict_pages, $page_security) === false) {