X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=js%2FCommon.js;h=294f76b98b295d97f1c3abc569bcacf59e128062;hb=02cea2af4f8af4b4094cfc3a4ab819f89dd16712;hp=191eba268f6a0c12b052b91918a2f6ef1ec414a0;hpb=0569e57797ccec8c931e6aa1e54a250b8a5f6bcf;p=civicrm-core.git diff --git a/js/Common.js b/js/Common.js index 191eba268f..294f76b98b 100644 --- a/js/Common.js +++ b/js/Common.js @@ -704,8 +704,9 @@ CRM.validate = CRM.validate || { * @param options {object|void} Override defaults, keys include 'title', 'message', * see jQuery.dialog for full list of available params */ - CRM.confirm = function (buttons, options) { + CRM.confirm = function (buttons, options, cancelLabel) { var dialog, callbacks = {}; + cancelLabel = cancelLabel || ts('Cancel'); var settings = { title: ts('Confirm Action'), message: ts('Are you sure you want to continue?'), @@ -716,7 +717,8 @@ CRM.validate = CRM.validate || { }, buttons: {} }; - settings.buttons[ts('Cancel')] = function () { + + settings.buttons[cancelLabel] = function () { dialog.dialog('close'); }; options = options || {};