Answers for "Moodle confirm box"

1

Moodle confirm box,

require(['core/str', 'core/notification’], function(str, notification) {
                str.get_strings([
                        {'key' : 'delete'},
                        {'key' : 'confirmdeletetag', component : 'tag'},
                        {'key' : 'yes'},
                        {'key' : 'no'},
                    ]).done(function(s) {
                        notification.confirm(s[0], s[1], s[2], s[3], function() {
                            window.location.href = href;
                        });
                    }
                ).fail(notification.exception);
});
Posted by: Guest on July-16-2021
0

Moodle confirm box

require(['core/notification’], function(notification) {
    notification.alert('Hello', 'Welcome to my site!', 'Continue');
});
Posted by: Guest on July-16-2021

Browse Popular Code Answers by Language