Show
added a comment - I wanted to check what was in the mentioned svn commit - so I've pasted the diff since it's not easy to get to anymore. I see the constant is there on
https://github.com/civicrm/civicrm-core/blob/6dd5c484fe8bad23de027e9de47277671ac57632/CRM/Report/Form.php#L41-41
Index: Core/Form.php
===================================================================
— Core/Form.php (revision 44551)
+++ Core/Form.php (revision 44552)
@@ -799,9 +799,14 @@
$this->addButtons($buttons);
}
function addDateRange($name, $from = '_from', $to = '_to', $label = 'From:', $dateFormat = 'searchDate', $required = FALSE) {
$this->addDate($name . $from, $label, $required, array('formatType' => $dateFormat));
$this->addDate($name . $to, ts('To:'), $required, array('formatType' => $dateFormat));
+ function addDateRange($name, $from = '_from', $to = '_to', $label = 'From:', $dateFormat = 'searchDate', $required = FALSE, $displayTime = FALSE)
Unknown macro: {+ if ($displayTime) {
+ $this->addDateTime($name . $from, $label, $required, array('formatType' => $dateFormat));
+ $this->addDateTime($name . $to, ts('To:'), $required, array('formatType' => $dateFormat));
+ } else {
+ $this->addDate($name . $from, $label, $required, array('formatType' => $dateFormat));
+ $this->addDate($name . $to, ts('To:'), $required, array('formatType' => $dateFormat));
+ } }
function addSelect($name, $label, $prefix = NULL, $required = NULL, $extra = NULL, $select = '- select -') {
Index: Core/Form/Date.php
===================================================================
— Core/Form/Date.php (revision 44551)
+++ Core/Form/Date.php (revision 44552)
@@ -77,7 +77,7 @@
@static
@access public
*/
static function buildDateRange(&$form, $fieldName, $count = 1, $from = '_from', $to = '_to', $fromLabel = 'From:', $required = FALSE, $addReportFilters = TRUE, $dateFormat = 'searchDate')
Unknown macro: {+ static function buildDateRange(&$form, $fieldName, $count = 1, $from = '_from', $to = '_to', $fromLabel = 'From}
Index: Report/Form.php
===================================================================
— Report/Form.php (revision 44551)
+++ Report/Form.php (revision 44552)
@@ -747,7 +747,10 @@
case CRM_Report_FORM::OP_DATE:
// build datetime fields
CRM_Core_Form_Date::buildDateRange($this, $fieldName, $count);
+ CRM_Core_Form_Date::buildDateRange(
+ $this, $fieldName, $count,
+ '_from', '_to', 'From:', FALSE, TRUE, 'searchDate',
+ $field ['type'] != CRM_Utils_Type::T_DATE);
$count++;
break;
Please see r44552