mirror of
https://github.com/moodle/moodle.git
synced 2025-07-28 01:41:03 +02:00
MDL-28195 confirm_action should allow the button labels to be customised
This commit is contained in:
@@ -275,8 +275,17 @@ M.util.show_confirm_dialog = function(e, args) {
|
||||
}
|
||||
};
|
||||
|
||||
var buttons = [ {text: M.str.moodle.cancel, handler: handle_cancel, isDefault: true},
|
||||
{text: M.str.moodle.yes, handler: handle_yes} ];
|
||||
if (!args.cancellabel) {
|
||||
args.cancellabel = M.str.moodle.cancel;
|
||||
}
|
||||
if (!args.continuelabel) {
|
||||
args.continuelabel = M.str.moodle.yes;
|
||||
}
|
||||
|
||||
var buttons = [
|
||||
{text: args.cancellabel, handler: handle_cancel, isDefault: true},
|
||||
{text: args.continuelabel, handler: handle_yes}
|
||||
];
|
||||
|
||||
simpledialog.cfg.queueProperty('buttons', buttons);
|
||||
|
||||
|
Reference in New Issue
Block a user