diff --git a/CHANGELOG.md b/CHANGELOG.md index d1f4259..6a1c730 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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! diff --git a/composer.json b/composer.json index ff3040d..9c443a0 100644 --- a/composer.json +++ b/composer.json @@ -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": [ diff --git a/src/Controllers/EventsController.php b/src/Controllers/EventsController.php index f8e29ca..9c92aab 100644 --- a/src/Controllers/EventsController.php +++ b/src/Controllers/EventsController.php @@ -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, @@ -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) { diff --git a/src/templates/events/_edit.html b/src/templates/events/_edit.html index 148b8f4..70b0f23 100644 --- a/src/templates/events/_edit.html +++ b/src/templates/events/_edit.html @@ -157,7 +157,11 @@
- {% 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 %}