Commit f4604fe5 authored by Andrew Nicols's avatar Andrew Nicols
Browse files

Merge branch 'MDL-72544' of git://github.com/paulholden/moodle

parents 4beb17e5 e8d7817f
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -155,7 +155,7 @@ const displaySuccessToast = copyButton => getSuccessText(copyButton)
* @private
*/
const displayFailureToast = () => getFailureText()
.then(message => addToast(message, {}));
.then(message => addToast(message, {type: 'warning'}));
/**
* Fetches the failure message to show to the user.
......
......@@ -51,7 +51,7 @@ export const addToastRegion = async(parent) => {
* @param {Object} configuration
* @param {String} [configuration.title]
* @param {String} [configuration.subtitle]
* @param {String} [configuration.type] Optional type of the toast notification ('success', 'info', 'warning' or 'danger')
* @param {String} [configuration.type=info] Optional type of the toast notification ('success', 'info', 'warning' or 'danger')
* @param {Boolean} [configuration.autohide=true]
* @param {Boolean} [configuration.closeButton=false]
* @param {Number} [configuration.delay=4000]
......@@ -74,6 +74,7 @@ export const addToastRegion = async(parent) => {
export const add = async(message, configuration) => {
const pendingPromise = new Pending('addToastRegion');
configuration = {
type: 'info',
closeButton: false,
autohide: true,
delay: 4000,
......
......@@ -87,6 +87,7 @@ information provided here is intended especially for developers.
The deprecated codes are removed from the questionlib for those two methods.
* The postgres driver now wraps calls to pg_field_type() and caches them in databasemeta to save an invisible internal
DB call on every request.
* The default type of 'core/toast' messages has been changed to 'information' (callers can still explicitely set the type)
* As the message_jabber notification plugin has been moved to the plugins database, the XMPPHP library (aka Jabber) has been
completely removed from Moodle core too.
* The SWF media player has been completely removed (The Flash Player was deprecated in 2017 and officially discontinued
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -379,7 +379,7 @@ const displayGradingError = async(root, user, err) => {
]);
Templates.replaceNodeContents(root.querySelector(Selectors.regions.gradingPanelErrors), html, js);
addToast(errorString);
addToast(errorString, {type: 'warning'});
};
/**
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -104,7 +104,7 @@ const show = async(rootNode, {
// We cannot use await in the following line.
// The reason is that we are preventing the default action of the save event being triggered,
// therefore we cannot define the event handler function asynchronous.
getString('nogatewayselected', 'core_payment').then(message => addToast(message)).catch();
getString('nogatewayselected', 'core_payment').then(message => addToast(message, {type: 'warning'})).catch();
}
e.preventDefault();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment