MDL-68409 js: Convert alert and confirmation dialogues to use modal
authorAndrew Nicols <andrew@nicols.co.uk>
Tue, 14 Apr 2020 01:10:14 +0000 (09:10 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Mon, 4 May 2020 07:08:10 +0000 (15:08 +0800)
lib/amd/build/notification.min.js
lib/amd/build/notification.min.js.map
lib/amd/src/notification.js
lib/upgrade.txt

index 2729ff1..e2a0bd3 100644 (file)
Binary files a/lib/amd/build/notification.min.js and b/lib/amd/build/notification.min.js differ
index 106bfa7..c9b4369 100644 (file)
Binary files a/lib/amd/build/notification.min.js.map and b/lib/amd/build/notification.min.js.map differ
index 8abb41a..0822899 100644 (file)
@@ -187,6 +187,20 @@ export const alert = async(title, message, cancelText) => {
  * @param {String|Promise} title
  * @param {String|Promise} question
  * @param {String|Promise} saveLabel
+ * @param {String|Promise} noLabel
+ * @param {String|Promise} saveCallback
+ * @param {String|Promise} cancelCallback
+ * @returns {Promise}
+ */
+export const confirm = (title, question, saveLabel, noLabel, saveCallback, cancelCallback) =>
+        saveCancel(title, question, saveLabel, saveCallback, cancelCallback);
+
+/**
+ * The Save and Cancel dialogue helper.
+ *
+ * @param {String|Promise} title
+ * @param {String|Promise} question
+ * @param {String|Promise} saveLabel
  * @param {String|Promise} saveCallback
  * @param {String|Promise} cancelCallback
  * @returns {Promise}
index eb04ddc..d950929 100644 (file)
@@ -47,6 +47,9 @@ information provided here is intended especially for developers.
   db/services.php. Note - this also requires $CFG->enable_read_only_sessions to be set to true.
 * database_manager::check_database_schema() now checks for missing and extra indexes.
 * Implement a more direct xsendfile_file() method for an alternative_file_system_class
+* The core/notification module has been updated to use AMD modals for its confirmation and alert dialogues.
+  The confirmation dialogue no longer has a configurable "No" button as per similar changes in MDL-59759.
+  This set of confirmation modals was unintentionally missed from that deprecation process.
 
 === 3.8 ===
 * Add CLI option to notify all cron tasks to stop: admin/cli/cron.php --stop