Skip to content

Commit

Permalink
Bugfix: We should pass along the settings to use event inquiries all …
Browse files Browse the repository at this point in the history
…the way..
  • Loading branch information
itssimple committed Feb 1, 2017
1 parent 70fcca3 commit 8a861dd
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@

## [Unreleased]
### Added

## [0.9.17.5]
### Added
- Added LICENSE.md
- Added limitedDiscountView in bookingTemplate to handle limited discount cards
- Added some phrases to defaultPhrases.json (I've got to find a way to do this automagically)
- Bugfix: Fixed date format function on profile -> discount cards. (used an old function)
- Bugfix: Suppressing warnings if `HTTP_REFERER` is missing
- Bugfix: We should use `edu__` in string concatenations instead of `edu_e`
- Bugfix: Event inquiry used the old date function
- Bugfix: We should pass along the settings to use event inquiries all the way..

## [0.9.17.4]
### Added
Expand Down
2 changes: 1 addition & 1 deletion backend/modules/edu.api.detailinfo.eventlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function edu_api_eventlist($request)
$alwaysFewSpots = $request['fewspots'];
$showVenue = $request['showvenue'];
$spotSettings = $request['spotsettings'];
$showEventInquiry = isset($request['event-inquiry']) && $request['event-inquiry'] == "1";
$showEventInquiry = isset($request['eventinquiry']) && $request['eventinquiry'] == "true";
$baseUrl = $surl . '/' . $cat;
$name = (!empty($selectedCourse->PublicName) ? $selectedCourse->PublicName : $selectedCourse->ObjectName);
$retStr .= '<div class="eduadmin"><div class="event-table eventDays">';
Expand Down
1 change: 1 addition & 0 deletions content/script/educlient/edu.apiclient.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ edu.apiclient = {
numberofevents: jQuery(target).data('numberofevents'),
fetchmonths: jQuery(target).data('fetchmonths'),
showvenue: jQuery(target).data('showvenue'),
eventinquiry: jQuery(target).data('eventinquiry'),
phrases: wp_edu.Phrases
},
success: function(d) {
Expand Down
5 changes: 4 additions & 1 deletion content/template/detailTemplate/template_A.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,9 @@
<?php
$showEventVenue = get_option('eduadmin-showEventVenueName', false);
?>
<div class="event-table eventDays" data-eduwidget="eventlist" data-objectid="<?php echo esc_attr($selectedCourse->ObjectID); ?>"
<div class="event-table eventDays"
data-eduwidget="eventlist"
data-objectid="<?php echo esc_attr($selectedCourse->ObjectID); ?>"
data-spotsleft="<?php echo get_option('eduadmin-spotsLeft', 'exactNumbers'); ?>"
data-spotsettings="<?php echo get_option('eduadmin-spotsSettings', "1-5\n5-10\n10+"); ?>"
data-fewspots="<?php echo get_option('eduadmin-alwaysFewSpots', "3"); ?>"
Expand All @@ -277,6 +279,7 @@
data-fetchmonths="<?php echo $fetchMonths; ?>"
<?php echo (isset($_REQUEST['eid']) ? ' data-event="' . $_REQUEST['eid'] . '"' : ''); ?>
data-showvenue="<?php echo @esc_attr($showEventVenue); ?>"
data-eventinquiry="<?php echo @esc_attr(get_option('eduadmin-allowInterestRegEvent', false)); ?>"
>
<?php
$i = 0;
Expand Down
5 changes: 4 additions & 1 deletion content/template/detailTemplate/template_B.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@
<?php
$showEventVenue = get_option('eduadmin-showEventVenueName', false);
?>
<div class="event-table eventDays" data-eduwidget="eventlist" data-objectid="<?php echo esc_attr($selectedCourse->ObjectID); ?>"
<div class="event-table eventDays"
data-eduwidget="eventlist"
data-objectid="<?php echo esc_attr($selectedCourse->ObjectID); ?>"
data-spotsleft="<?php echo get_option('eduadmin-spotsLeft', 'exactNumbers'); ?>"
data-spotsettings="<?php echo get_option('eduadmin-spotsSettings', "1-5\n5-10\n10+"); ?>"
data-fewspots="<?php echo get_option('eduadmin-alwaysFewSpots', "3"); ?>"
Expand All @@ -240,6 +242,7 @@
data-fetchmonths="<?php echo $fetchMonths; ?>"
<?php echo (isset($_REQUEST['eid']) ? ' data-event="' . $_REQUEST['eid'] . '"' : ''); ?>
data-showvenue="<?php echo @esc_attr($showEventVenue); ?>"
data-eventinquiry="<?php echo @esc_attr(get_option('eduadmin-allowInterestRegEvent', false)); ?>"
>
<?php
foreach($events as $ev)
Expand Down
1 change: 1 addition & 0 deletions includes/_shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ function eduadmin_get_detailinfo($attributes)
' data-order="' . $customOrderBy . '"' .
' data-orderby="' . $customOrderByOrder . '"' .
' data-showvenue="' . get_option('eduadmin-showEventVenueName', false) . '"' .
' data-eventinquiry="' . get_option('eduadmin-allowInterestRegEvent', false) . '"' .
'>';
$i = 0;
$hasHiddenDates = false;
Expand Down

0 comments on commit 8a861dd

Please sign in to comment.