Skip to content

Commit

Permalink
feature(js): requiresConfirmation now returns false if not confirmed
Browse files Browse the repository at this point in the history
fixes #9240
  • Loading branch information
jdalsem committed Mar 23, 2016
1 parent b96c736 commit cac5c0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/lib/ui.js
Expand Up @@ -290,15 +290,15 @@ elgg.ui.initHoverMenu = function(parent) {
}; };


/** /**
* Calls a confirm() and prevents default if denied. * Calls a confirm() and returns false if denied.
* *
* @param {Object} e * @param {Object} e
* @return void * @return void
*/ */
elgg.ui.requiresConfirmation = function(e) { elgg.ui.requiresConfirmation = function(e) {
var confirmText = $(this).data('confirm') || elgg.echo('question:areyousure'); var confirmText = $(this).data('confirm') || elgg.echo('question:areyousure');
if (!confirm(confirmText)) { if (!confirm(confirmText)) {
e.preventDefault(); return false;
} }
}; };


Expand Down

0 comments on commit cac5c0f

Please sign in to comment.