| and copyright information, see https://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
-use Civi\Payment\PropertyBag;
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC https://civicrm.org/licensing
- */
+use Civi\Payment\PropertyBag;
/**
* This class provides support for canceling recurring subscriptions.
protected $_mode = NULL;
+ /**
+ * The contributor email
+ *
+ * @var string
+ */
+ protected $_donorEmail = '';
+
/**
* Should custom data be suppressed on this form.
*
}
$this->assign('cancelSupported', $cancelSupported);
- if ($this->_donorEmail) {
- $this->add('checkbox', 'is_notify', ts('Notify Contributor?'));
+ if (!empty($this->_donorEmail)) {
+ $this->add('checkbox', 'is_notify', ts('Notify Contributor?') . " ({$this->_donorEmail})");
}
if ($this->_mid) {
$cancelButton = ts('Cancel Automatic Membership Renewal');
$params['send_cancel_request'] = 1;
}
- if ($this->_donorEmail) {
+ if (!empty($this->_donorEmail)) {
$params['is_notify'] = 1;
}
}
unset($extra['option_context']);
}
- $element = $this->addElement($type, $name, $label, $attributes, $extra);
+ $element = $this->addElement($type, $name, CRM_Utils_String::purifyHTML($label), $attributes, $extra);
if (HTML_QuickForm::isError($element)) {
CRM_Core_Error::fatal(HTML_QuickForm::errorMessage($element));
}