Merge pull request #647 from PalanteJon/soft-credit-api-3
[civicrm-core.git] / js / Common.js
index 191eba268f6a0c12b052b91918a2f6ef1ec414a0..294f76b98b295d97f1c3abc569bcacf59e128062 100644 (file)
@@ -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 || {};