Skip to content
Snippets Groups Projects
Commit 97301636 authored by francescbassas's avatar francescbassas Committed by francescbassas
Browse files

#964 Add date start and end values on page contribution widget ajax response

parent 405192f1
No related branches found
No related tags found
No related merge requests found
......@@ -127,6 +127,7 @@ class CRM_Contribute_BAO_Widget extends CRM_Contribute_DAO_Widget {
$now = time();
if ($dao->start_date) {
$startDate = CRM_Utils_Date::unixTime($dao->start_date);
$data['start_date'] = $dao->start_date;
if ($startDate && $startDate >= $now) {
$data['is_active'] = FALSE;
$data['campaign_start'] = ts('Campaign starts on %1', [
......@@ -137,6 +138,7 @@ class CRM_Contribute_BAO_Widget extends CRM_Contribute_DAO_Widget {
if ($dao->end_date) {
$endDate = CRM_Utils_Date::unixTime($dao->end_date);
$data['end_date'] = $dao->end_date;
if ($endDate &&
$endDate < $now
) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment