diff --git a/admin/tool/componentlibrary/content/moodle/javascript/confirm.md b/admin/tool/componentlibrary/content/moodle/javascript/confirm.md index 73392b0ec44..f6c74fac2f5 100644 --- a/admin/tool/componentlibrary/content/moodle/javascript/confirm.md +++ b/admin/tool/componentlibrary/content/moodle/javascript/confirm.md @@ -24,7 +24,7 @@ The confirmation AMD module is loaded automatically, so the only thing you need to the target element: {{< highlight html >}} +data-confirmation-content-str='["areyousure"]' data-confirmation-yes-button-str='["delete", "core"]'>Show confirmation modal {{< /highlight >}} You can also use it on PHP, you just need to set the attributes parameter to any moodle output component that takes attributes: @@ -32,7 +32,7 @@ You can also use it on PHP, you just need to set the attributes parameter to any echo $OUTPUT->single_button('#', get_string('delete'), 'get', [ 'data-confirmation' => 'modal', 'data-confirmation-title-str' => json_encode(['delete', 'core']), - 'data-confirmation-question-str' => json_encode(['areyousure']), + 'data-confirmation-content-str' => json_encode(['areyousure']), 'data-confirmation-yes-button-str' => json_encode(['delete', 'core']) ]); {{< / php >}} @@ -56,8 +56,8 @@ echo $OUTPUT->single_button('#', get_string('delete'), 'get', [