mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-09-05 10:18:33 +08:00
Fix #245 - [Legacy] Sugar_html onclick action issues
- replace sugar_html submit actions with get request, as required for the new UI
This commit is contained in:
parent
5e8175c97a
commit
66686b2d0d
1 changed files with 2 additions and 3 deletions
|
@ -570,10 +570,9 @@ function replaceFormClick(&$dom_tree = array(), $js_form = '', &$hidden_field_ex
|
|||
}
|
||||
//Onclick handler contains returning a variable, for example it prompts a confirm message.
|
||||
if (strpos($dom_tree['onclick'], "return ") !== false) {
|
||||
$dom_tree['onclick'] = $js_form.' var _onclick=(function(){ldelim}'.$dom_tree['onclick']."{rdelim}()); if(_onclick!==false) _form.submit();";
|
||||
} else {
|
||||
$dom_tree['onclick'] = $js_form.$dom_tree['onclick']."_form.submit();";
|
||||
$dom_tree['onclick'] = ' var _onclick=(function(){ldelim}' . $dom_tree['onclick'] . "{rdelim}()); if(_onclick!==false) ";
|
||||
}
|
||||
$dom_tree['onclick'] = $js_form.$dom_tree['onclick']."window.location.href='index.php?' + (new URLSearchParams(new FormData(_form)).toString());";
|
||||
|
||||
$set_submit = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue