MDL-60013 report_progress: Stop using deprecated modal type
authorAndrew Nicols <andrew@nicols.co.uk>
Wed, 17 Jul 2019 00:26:27 +0000 (08:26 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Wed, 17 Jul 2019 00:26:27 +0000 (08:26 +0800)
report/progress/amd/build/completion_override.min.js
report/progress/amd/src/completion_override.js

index 5c8c845..18cd7d2 100644 (file)
Binary files a/report/progress/amd/build/completion_override.min.js and b/report/progress/amd/build/completion_override.min.js differ
index 785168d..9cca52c 100644 (file)
@@ -126,9 +126,9 @@ define(['jquery', 'core/ajax', 'core/str', 'core/modal_factory', 'core/modal_eve
                     {key: 'areyousureoverridecompletion', component: 'completion', param: strings[0]}
                 ]);
             }).then(function(strings) {
-                // Create a yes/no modal.
+                // Create a save/cancel modal.
                 return ModalFactory.create({
-                    type: ModalFactory.types.CONFIRM,
+                    type: ModalFactory.types.SAVE_CANCEL,
                     title: strings[0],
                     body: strings[1],
                 });
@@ -136,7 +136,7 @@ define(['jquery', 'core/ajax', 'core/str', 'core/modal_factory', 'core/modal_eve
                 // Now set up the handlers for the confirmation or cancellation of the modal, and show it.
 
                 // Confirmation only.
-                modal.getRoot().on(ModalEvents.yes, function() {
+                modal.getRoot().on(ModalEvents.save, function() {
                     setOverride(override);
                 });