Skip to content

Commit

Permalink
v2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kjmartens committed May 16, 2018
1 parent 3170920 commit c7d744d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Solspace Calendar Changelog

## 2.0.1 - 2018-05-16
### Fixed
- Fixed a bug where the Event UI dates and times were being localized while editing an existing event in control panel.
- Fixed a bug where switching the Site selector while creating a new event would use the wrong CP URL path.

## 2.0.0 - 2018-05-15
### Changed
- Nothing to report here, other than that Calendar is now officially out of beta!
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "solspace/craft3-calendar",
"description": "The most powerful event management plugin for Craft.",
"version": "2.0.0",
"version": "2.0.1",
"type": "craft-plugin",
"minimum-stability": "dev",
"authors": [
Expand Down
3 changes: 1 addition & 2 deletions src/Controllers/EventsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function actionCreateEvent(string $handle, string $siteHandle = null): Re
}

if ($siteHandle) {
$site = \Craft::$app->sites->getSiteByHandle($handle);
$site = \Craft::$app->sites->getSiteByHandle($siteHandle);
if (!$site) {
throw new HttpException(
404,
Expand Down Expand Up @@ -330,7 +330,6 @@ private function renderEditForm(Event $event, string $title): Response
$dateFormat = FormatConverter::convertDateIcuToPhp($dateFormat);
$timeFormat = FormatConverter::convertDateIcuToPhp($timeFormat, 'time');


$enabledSiteIds = null;
if (\Craft::$app->getIsMultiSite()) {
if ($event->id !== null) {
Expand Down
6 changes: 5 additions & 1 deletion src/templates/events/_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,11 @@

<div id="revision-btn"
class="btn menubtn"{% if showSites %} data-icon="world"{% endif %}>{{ event.site.name }}</div>
{% set baseUrl = "calendar/events/#{event.id}/" %}
{% if event.id %}
{% set baseUrl = "calendar/events/#{event.id}/" %}
{% else %}
{% set baseUrl = "calendar/events/new/#{event.calendar.handle}/" %}
{% endif %}
<div class="menu">
{% set siteGroups = craft.app.sites.getAllGroups() %}
{% for group in siteGroups %}
Expand Down
4 changes: 2 additions & 2 deletions src/templates/field/_event.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@

<ul class="cal-group field">
<li class="cal-date-row" data-affected-by="all-day-toggle">
{{ dateTimeField(event, 'startDate', 'startDate', 'Start Date'|t('calendar'), name) }}
{{ dateTimeField(event, 'startDate', 'startDateLocalized', 'Start Date'|t('calendar'), name) }}
</li>
<li class="cal-date-row" data-affected-by="all-day-toggle">
{{ dateTimeField(event, 'endDate', 'endDate', 'End Date'|t('calendar'), name) }}
{{ dateTimeField(event, 'endDate', 'endDateLocalized', 'End Date'|t('calendar'), name) }}
</li>
<li class="event-all-day">
{{ forms.lightswitchField({
Expand Down

0 comments on commit c7d744d

Please sign in to comment.