mirror of
https://github.com/vrana/adminer.git
synced 2025-08-07 15:16:44 +02:00
JS: Use arrow functions
All function () {} left in the code reference `this` and thus couldn't use arrow functions.
This commit is contained in:
@@ -150,7 +150,7 @@ function html_radios($name, $options, $value = "") {
|
||||
* @return string
|
||||
*/
|
||||
function confirm($message = "", $selector = "qsl('input')") {
|
||||
return script("$selector.onclick = function () { return confirm('" . ($message ? js_escape($message) : lang('Are you sure?')) . "'); };", "");
|
||||
return script("$selector.onclick = () => confirm('" . ($message ? js_escape($message) : lang('Are you sure?')) . "');", "");
|
||||
}
|
||||
|
||||
/** Print header for hidden fieldset (close by </div></fieldset>)
|
||||
|
Reference in New Issue
Block a user