Add simple auto mode
This commit is contained in:
parent
a709cc583f
commit
752fe22c68
@ -9777,7 +9777,13 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url =
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Js Confirm button
|
// 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
|
// 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-url'] = $params['confirm']['url'];
|
||||||
$attr['data-confirm-title'] = !empty($params['confirm']['title']) ? $params['confirm']['title'] : $langs->trans('ConfirmBtnCommonTitle', $label);
|
$attr['data-confirm-title'] = !empty($params['confirm']['title']) ? $params['confirm']['title'] : $langs->trans('ConfirmBtnCommonTitle', $label);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user