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', [ The modal title language string identifier, must be provided in JSON encoded format. - data-confirmation-question-str - The confirmation question language string identifier, must be provided in JSON encoded format. + data-confirmation-content-str + The modal main content language string identifier, must be provided in JSON encoded format. data-confirmation-yes-button-str @@ -86,14 +86,14 @@ echo $OUTPUT->single_button('#', get_string('delete'), 'get', [ {{< example >}} +data-confirmation-content-str='["areyousure"]' data-confirmation-yes-button-str='["ok", "core"]'>Show confirmation modal {{< /example >}} #### Delete Modal {{< example >}} +data-confirmation-content-str='["areyousure"]' data-confirmation-yes-button-str='["delete", "core"]'>Show delete modal {{< /example >}} @@ -101,7 +101,7 @@ data-confirmation-question-str='["areyousure"]' data-confirmation-yes-button-str {{< example >}} {{< /example >}} @@ -109,6 +109,6 @@ data-confirmation-toast-confirmation-str='["saved", "core_question", "My questio {{< example >}} {{< /example >}}