mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-24 10:21:32 +01:00
Add simple auto mode
This commit is contained in:
@@ -9777,7 +9777,13 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url =
|
||||
}
|
||||
|
||||
// Js Confirm button
|
||||
if (!empty($params['confirm']) && is_array($params['confirm']) && !empty($params['confirm']['url'])) {
|
||||
if (!empty($params['confirm'])) {
|
||||
if (!is_array($params['confirm'])) {
|
||||
$params['confirm'] = array(
|
||||
'url' => $url . (strpos($url, '?') > 0 ? '&' : '?') . 'confirm=yes'
|
||||
);
|
||||
}
|
||||
|
||||
// for js desabled compatibility set $url as call to confirm action and $params['confirm']['url'] to confirmed action
|
||||
$attr['data-confirm-url'] = $params['confirm']['url'];
|
||||
$attr['data-confirm-title'] = !empty($params['confirm']['title']) ? $params['confirm']['title'] : $langs->trans('ConfirmBtnCommonTitle', $label);
|
||||
|
||||
Reference in New Issue
Block a user