From 7c1cc4dda371006d1ff05adb3bba216726e6fe14 Mon Sep 17 00:00:00 2001 From: Kelsey Martens Date: Thu, 26 Jul 2018 23:23:15 -0500 Subject: [PATCH] v2.0.5 --- CHANGELOG.md | 6 ++++++ composer.json | 2 +- src/Controllers/CodePackController.php | 2 +- src/Controllers/EventsController.php | 19 +++++++++++++++---- src/Resources/css/src/event-edit.css | 2 +- src/Services/EventsService.php | 10 +++++----- src/codepack/templates/layouts/_layout.html | 2 +- src/templates/codepack/index.html | 4 +++- src/templates/layouts/_settings.html | 10 +++++++++- src/templates/settings/_events.html | 2 -- src/templates/settings/_general.html | 2 -- src/templates/settings/_guest_access.html | 2 -- src/translations/en-US/calendar.php | 2 +- 13 files changed, 43 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9b22c4..36f3fea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Solspace Calendar Changelog +## 2.0.5 - 2018-07-26 +### Fixed +- Fixed a bug where disabled events would error when being viewed/edited. +- Fixed a bug where Guest access for submitting events on front end was broken. +- Fixed a bug where Live Preview was not correctly showing some repeat rule options. + ## 2.0.4 - 2018-07-04 ### Added - Added `endsBefore`, `endsBeforeOrAt`, `startsAfter` and `startsAfterOrAt` parameters to `calendar.events` function, for more flexibility to narrow down results. diff --git a/composer.json b/composer.json index 5e6215f..8fea91a 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.4", + "version": "2.0.5", "type": "craft-plugin", "minimum-stability": "dev", "authors": [ diff --git a/src/Controllers/CodePackController.php b/src/Controllers/CodePackController.php index 33fdf5f..4bf8bc5 100644 --- a/src/Controllers/CodePackController.php +++ b/src/Controllers/CodePackController.php @@ -50,7 +50,7 @@ public function actionListContents(): Response 'calendar/codepack', [ 'codePack' => $codePack, - 'prefix' => 'calendar_demo', + 'prefix' => 'calendar-demo', ] ); } diff --git a/src/Controllers/EventsController.php b/src/Controllers/EventsController.php index d4a121d..37f0a7a 100644 --- a/src/Controllers/EventsController.php +++ b/src/Controllers/EventsController.php @@ -3,6 +3,7 @@ namespace Solspace\Calendar\Controllers; use Carbon\Carbon; +use craft\db\Query; use craft\elements\User; use craft\events\ElementEvent; use craft\helpers\Json; @@ -28,7 +29,7 @@ class EventsController extends BaseController const EVENT_FIELD_NAME = 'calendarEvent'; const EVENT_PREVIEW_EVENT = 'previewEvent'; - protected $allowAnonymous = ['actionSaveEvent']; + protected $allowAnonymous = ['save-event']; /** * @return Response @@ -118,7 +119,7 @@ public function actionEditEvent(int $id, string $siteHandle = null): Response EventEditBundle::$locale = $locale; } - $event = $this->getEventsService()->getEventById($id, $siteId); + $event = $this->getEventsService()->getEventById($id, $siteId, true); if (!$event) { throw new HttpException( @@ -177,6 +178,16 @@ public function actionSaveEvent() } } + if (!$event->authorId) { + $event->authorId = (int) (new Query()) + ->select('id') + ->from('{{%users}}') + ->where(['admin' => 1]) + ->limit(1) + ->orderBy(['id' => SORT_ASC]) + ->scalar(); + } + $isEnabled = (bool) \Craft::$app->request->post('enabled', $event->enabled); $event->enabled = $isEnabled; @@ -452,7 +463,7 @@ private function getEventModel(): Event $calendarId = \Craft::$app->getRequest()->getBodyParam('calendarId'); if ($eventId) { - $entry = $this->getEventsService()->getEventById($eventId, $siteId); + $entry = $this->getEventsService()->getEventById($eventId, $siteId, true); if (!$eventId) { throw new NotFoundHttpException('Event not found'); @@ -600,7 +611,7 @@ private function showEvent(Event $event): Response private function getExistingOrNewEvent(int $eventId = null, int $siteId = null): Event { if ($eventId) { - $event = $this->getEventsService()->getEventById($eventId, $siteId); + $event = $this->getEventsService()->getEventById($eventId, $siteId, true); if (!$event) { throw new HttpException( diff --git a/src/Resources/css/src/event-edit.css b/src/Resources/css/src/event-edit.css index d338f84..45bbf9b 100644 --- a/src/Resources/css/src/event-edit.css +++ b/src/Resources/css/src/event-edit.css @@ -1 +1 @@ -.recurrence-choices-specific>li:after{content:"";display:table;clear:both}body.ltr #locales{padding:0 0 0 24px}body.rtl #locales{padding:0 24px 0 0}#locales li{position:relative}body.ltr #locales li{padding:7px 45px 7px 0}body.rtl #locales li{padding:7px 0 7px 45px}#locales li+li{border-top:1px solid rgba(115,127,140,0.15)}#locales li.sel{color:#8f98a3;cursor:default}#locales li.sel:before{font-size:11px;color:#8f98a3 !important;font-family:'Craft';speak:none;-webkit-font-feature-settings:"liga", "dlig";-moz-font-feature-settings:"liga=1, dlig=1";-moz-font-feature-settings:"liga", "dlig";-ms-font-feature-settings:"liga", "dlig";-o-font-feature-settings:"liga", "dlig";font-feature-settings:"liga", "dlig";text-rendering:optimizeLegibility;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;text-align:center;font-style:normal;vertical-align:middle;word-wrap:normal !important;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;content:'check'}body.ltr #locales li.sel:before{float:left}body.rtl #locales li.sel:before{float:right}body.ltr #locales li.sel:before{margin:3px 0 0 -16px}body.rtl #locales li.sel:before{margin:3px -16px 0 0}#locales li a{color:#29323d}#locales li a:hover{color:#0d78f2;cursor:pointer}#locales li .lightswitch{position:absolute;top:50%;margin-top:-9px}body.ltr #locales li .lightswitch{right:9px}body.rtl #locales li .lightswitch{left:9px}#locales li .status{display:block;position:absolute;top:50%;margin:-5px 0 0}body.ltr #locales li .status{right:16px}body.rtl #locales li .status{left:16px}#settings .select,#settings .select select{width:100%}.recurrence-choices-specific>li:after{content:"";display:table;clear:both}.ui-timepicker-with-duration .ui-timepicker-list{width:14em}.ui-datepicker-calendar .ui-datepicker-unselectable>span{display:block;width:26px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;line-height:26px;text-align:center;color:#cdcdcd}.hasDatepicker:-ms-input-placeholder,.ui-timepicker-input:-ms-input-placeholder{padding-left:20px}.hasDatepicker::placeholder,.ui-timepicker-input::placeholder{padding-left:20px}.cal-grid:after{content:'';display:table;clear:both}.cal-grid *[class^="cal-row-"]{display:block;float:left}.cal-grid .cal-row-1{width:8.33333%}.cal-grid .cal-row-2{width:16.66667%}.cal-grid .cal-row-3{width:25%}.cal-grid .cal-row-4{width:33.33333%}.cal-grid .cal-row-5{width:41.66667%}.cal-grid .cal-row-6{width:50%}.cal-grid .cal-row-7{width:58.33333%}.cal-grid .cal-row-8{width:66.66667%}.cal-grid .cal-row-9{width:75%}.cal-grid .cal-row-10{width:83.33333%}.cal-grid .cal-row-11{width:91.66667%}ul.cal-group{margin:auto -10px}ul.cal-group:after{content:'';display:table;clear:both}ul.cal-group>li{display:block;float:left;margin:0 10px}ul.cal-group>li.side-label{margin-top:20px}ul.cal-group>li.side-label .field:after{content:'';display:table;clear:both}ul.cal-group>li.side-label .field .heading{float:left;margin:6px 10px 0 0}ul.cal-group>li.side-label .field .input{float:left}ul.cal-group>li.side-label.radio-group .field .input:after{content:'';display:table;clear:both}ul.cal-group>li.side-label.radio-group .field .input>div{float:left;margin:5px 0 0 0}ul.cal-group>li.side-label.radio-group .field .input>div:first-child{margin-right:25px}.event-interval .heading label{font-weight:normal}.event-all-day .input{margin-top:8px}.cal-date-row{width:230px;-webkit-transition:width 0.3s ease-out;-moz-transition:width 0.3s ease-out;-ms-transition:width 0.3s ease-out;-o-transition:width 0.3s ease-out;transition:width 0.3s ease-out}.cal-date-row.short{width:105px}.recurrence-switch{position:relative}.recurrence-switch .recurrence-choices{position:absolute;top:0;left:70px;-webkit-transition:all 0.2s ease-out;-moz-transition:all 0.2s ease-out;-ms-transition:all 0.2s ease-out;-o-transition:all 0.2s ease-out;transition:all 0.2s ease-out}.recurrence-switch .recurrence-choices.no-show{left:200px;opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=” $value * 100 “)";filter:alpha(opacity=0);zoom:1;pointer-events:none}.until-switch{position:relative}.until-switch .cal-group{position:absolute;top:6px;left:130px;-webkit-transition:all 0.2s ease-out;-moz-transition:all 0.2s ease-out;-ms-transition:all 0.2s ease-out;-o-transition:all 0.2s ease-out;transition:all 0.2s ease-out}.until-switch .cal-group li.until-count{display:none}.until-switch .cal-group li.until-count:after{content:'';display:table;clear:both}.until-switch .cal-group li.until-count>*{float:left}.until-switch .cal-group li.until-count>label{margin:6px 0 0 10px}.until-switch .cal-group.no-show{left:200px;opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=” $value * 100 “)";filter:alpha(opacity=0);zoom:1;pointer-events:none}.recurrence-choices-specific>li{display:none}.recurrence-choices-specific>li>*{display:block;float:left}.recurrence-choices-specific>li>label{margin:7px 10px 0 0}.recurrence-choices-specific>li>label.spaced{margin:7px 30px 0 0}.recurrence-choices-specific>li>.field{margin:0}.recurrence-wrapper{display:none}.recurrence-block{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;padding:15px 15px 8px;background:#F9F9F9}.recurrence-block div.checkbox-group:after{content:'';display:table;clear:both}.recurrence-block div.checkbox-group>div{float:left;margin:0 7px 7px 0}.recurrence-block div.checkbox-group>div input[type=checkbox]{display:none}.recurrence-block div.checkbox-group>div input[type=checkbox]+label{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;display:block;width:25px;height:25px;white-space:nowrap;padding:4px 0 0 !important;background:#fff;text-align:center;-webkit-transition:all 0.3s ease-out;-moz-transition:all 0.3s ease-out;-ms-transition:all 0.3s ease-out;-o-transition:all 0.3s ease-out;transition:all 0.3s ease-out}.recurrence-block div.checkbox-group>div input[type=checkbox]+label:before{display:none}.recurrence-block div.checkbox-group>div input[type=checkbox]+label:hover{background-color:#e6e6e6}.recurrence-block div.checkbox-group>div input[type=checkbox]:checked+label{color:#FFFFFF;background-color:#727F8B}.recurrence-block div.checkbox-group>div input[type=checkbox]:checked+label:hover{background-color:#5b656f}.recurrence-block div.checkbox-group.month-days{max-width:530px}.recurrence-block .months{width:330px}.recurrence-block .months .checkbox-group{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.recurrence-block .months .checkbox-group>div{-ms-flex:0 0 30%;flex:0 0 30%}.recurrence-block .months .checkbox-group>div label{width:auto !important}ul.date-list>li{position:relative;background:#F9F9F9;padding:5px 10px 5px 30px}ul.date-list>li:first-child{padding-top:10px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;background-clip:padding-box}ul.date-list>li:first-child>a{top:10px}ul.date-list>li:last-child{padding-bottom:10px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;background-clip:padding-box}ul.date-list>li>a{position:absolute;top:5px;left:10px;display:block;width:13px;height:20px;color:#CCCCCC;-webkit-transition:color 0.2s ease-out;-moz-transition:color 0.2s ease-out;-ms-transition:color 0.2s ease-out;-o-transition:color 0.2s ease-out;transition:color 0.2s ease-out}ul.date-list>li>a:hover{color:#da5a47;text-decoration:none}ul.date-list>li>a:before{content:'remove';font-family:Craft, sans-serif}.select-dates-wrapper{display:none}.ui-datepicker{z-index:102 !important} +.recurrence-choices-specific>li:after{content:"";display:table;clear:both}body.ltr #locales{padding:0 0 0 24px}body.rtl #locales{padding:0 24px 0 0}#locales li{position:relative}body.ltr #locales li{padding:7px 45px 7px 0}body.rtl #locales li{padding:7px 0 7px 45px}#locales li+li{border-top:1px solid rgba(115,127,140,0.15)}#locales li.sel{color:#8f98a3;cursor:default}#locales li.sel:before{font-size:11px;color:#8f98a3 !important;font-family:'Craft';speak:none;-webkit-font-feature-settings:"liga", "dlig";-moz-font-feature-settings:"liga=1, dlig=1";-moz-font-feature-settings:"liga", "dlig";-ms-font-feature-settings:"liga", "dlig";-o-font-feature-settings:"liga", "dlig";font-feature-settings:"liga", "dlig";text-rendering:optimizeLegibility;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;text-align:center;font-style:normal;vertical-align:middle;word-wrap:normal !important;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;content:'check'}body.ltr #locales li.sel:before{float:left}body.rtl #locales li.sel:before{float:right}body.ltr #locales li.sel:before{margin:3px 0 0 -16px}body.rtl #locales li.sel:before{margin:3px -16px 0 0}#locales li a{color:#29323d}#locales li a:hover{color:#0d78f2;cursor:pointer}#locales li .lightswitch{position:absolute;top:50%;margin-top:-9px}body.ltr #locales li .lightswitch{right:9px}body.rtl #locales li .lightswitch{left:9px}#locales li .status{display:block;position:absolute;top:50%;margin:-5px 0 0}body.ltr #locales li .status{right:16px}body.rtl #locales li .status{left:16px}#settings .select,#settings .select select{width:100%}.recurrence-choices-specific>li:after{content:"";display:table;clear:both}.ui-timepicker-with-duration .ui-timepicker-list{width:14em}.ui-datepicker-calendar .ui-datepicker-unselectable>span{display:block;width:26px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;line-height:26px;text-align:center;color:#cdcdcd}.hasDatepicker:-ms-input-placeholder,.ui-timepicker-input:-ms-input-placeholder{padding-left:20px}.hasDatepicker::placeholder,.ui-timepicker-input::placeholder{padding-left:20px}.cal-grid:after{content:'';display:table;clear:both}.cal-grid *[class^="cal-row-"]{display:block;float:left}.cal-grid .cal-row-1{width:8.33333%}.cal-grid .cal-row-2{width:16.66667%}.cal-grid .cal-row-3{width:25%}.cal-grid .cal-row-4{width:33.33333%}.cal-grid .cal-row-5{width:41.66667%}.cal-grid .cal-row-6{width:50%}.cal-grid .cal-row-7{width:58.33333%}.cal-grid .cal-row-8{width:66.66667%}.cal-grid .cal-row-9{width:75%}.cal-grid .cal-row-10{width:83.33333%}.cal-grid .cal-row-11{width:91.66667%}ul.cal-group{margin:auto -10px}ul.cal-group:after{content:'';display:table;clear:both}ul.cal-group>li{display:block;float:left;margin:0 10px}ul.cal-group>li.side-label{margin-top:20px}ul.cal-group>li.side-label .field:after{content:'';display:table;clear:both}ul.cal-group>li.side-label .field .heading{float:left;margin:6px 10px 0 0}ul.cal-group>li.side-label .field .input{float:left}ul.cal-group>li.side-label.radio-group .field .input:after{content:'';display:table;clear:both}ul.cal-group>li.side-label.radio-group .field .input>div{float:left;margin:5px 0 0 0}ul.cal-group>li.side-label.radio-group .field .input>div:first-child{margin-right:25px}.event-interval .heading label{font-weight:normal}.event-all-day .input{margin-top:8px}.cal-date-row{width:230px;-webkit-transition:width 0.3s ease-out;-moz-transition:width 0.3s ease-out;-ms-transition:width 0.3s ease-out;-o-transition:width 0.3s ease-out;transition:width 0.3s ease-out}.cal-date-row.short{width:105px}.recurrence-switch{position:relative;display:-ms-flexbox;display:flex}.recurrence-switch .recurrence-choices{display:-ms-flexbox;display:flex;-ms-flex-line-pack:start;align-content:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-transition:all 0.2s ease-out;-moz-transition:all 0.2s ease-out;-ms-transition:all 0.2s ease-out;-o-transition:all 0.2s ease-out;transition:all 0.2s ease-out}.recurrence-switch .recurrence-choices>li{float:none;white-space:nowrap}.recurrence-switch .recurrence-choices.no-show{left:200px;opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=” $value * 100 “)";filter:alpha(opacity=0);zoom:1;pointer-events:none}.recurrence-switch .recurrence-choices .recurrence-choice-monthly{display:-ms-flexbox;display:flex}.recurrence-switch .recurrence-choices .recurrence-choice-monthly>*{float:none}.until-switch{position:relative}.until-switch .cal-group{position:absolute;top:6px;left:130px;-webkit-transition:all 0.2s ease-out;-moz-transition:all 0.2s ease-out;-ms-transition:all 0.2s ease-out;-o-transition:all 0.2s ease-out;transition:all 0.2s ease-out}.until-switch .cal-group li.until-count{display:none}.until-switch .cal-group li.until-count:after{content:'';display:table;clear:both}.until-switch .cal-group li.until-count>*{float:left}.until-switch .cal-group li.until-count>label{margin:6px 0 0 10px}.until-switch .cal-group.no-show{left:200px;opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=” $value * 100 “)";filter:alpha(opacity=0);zoom:1;pointer-events:none}.recurrence-choices-specific>li{display:none}.recurrence-choices-specific>li>*{display:block;float:left}.recurrence-choices-specific>li>label{margin:7px 10px 0 0}.recurrence-choices-specific>li>label.spaced{margin:7px 30px 0 0}.recurrence-choices-specific>li>.field{margin:0}.recurrence-wrapper{display:none}.recurrence-block{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;padding:15px 15px 8px;background:#F9F9F9}.recurrence-block div.checkbox-group:after{content:'';display:table;clear:both}.recurrence-block div.checkbox-group>div{float:left;margin:0 7px 7px 0}.recurrence-block div.checkbox-group>div input[type=checkbox]{display:none}.recurrence-block div.checkbox-group>div input[type=checkbox]+label{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;display:block;width:25px;height:25px;white-space:nowrap;padding:4px 0 0 !important;background:#fff;text-align:center;-webkit-transition:all 0.3s ease-out;-moz-transition:all 0.3s ease-out;-ms-transition:all 0.3s ease-out;-o-transition:all 0.3s ease-out;transition:all 0.3s ease-out}.recurrence-block div.checkbox-group>div input[type=checkbox]+label:before{display:none}.recurrence-block div.checkbox-group>div input[type=checkbox]+label:hover{background-color:#e6e6e6}.recurrence-block div.checkbox-group>div input[type=checkbox]:checked+label{color:#FFFFFF;background-color:#727F8B}.recurrence-block div.checkbox-group>div input[type=checkbox]:checked+label:hover{background-color:#5b656f}.recurrence-block div.checkbox-group.month-days{max-width:530px}.recurrence-block .months{width:330px}.recurrence-block .months .checkbox-group{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.recurrence-block .months .checkbox-group>div{-ms-flex:0 0 30%;flex:0 0 30%}.recurrence-block .months .checkbox-group>div label{width:auto !important}ul.date-list>li{position:relative;background:#F9F9F9;padding:5px 10px 5px 30px}ul.date-list>li:first-child{padding-top:10px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;background-clip:padding-box}ul.date-list>li:first-child>a{top:10px}ul.date-list>li:last-child{padding-bottom:10px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;background-clip:padding-box}ul.date-list>li>a{position:absolute;top:5px;left:10px;display:block;width:13px;height:20px;color:#CCCCCC;-webkit-transition:color 0.2s ease-out;-moz-transition:color 0.2s ease-out;-ms-transition:color 0.2s ease-out;-o-transition:color 0.2s ease-out;transition:color 0.2s ease-out}ul.date-list>li>a:hover{color:#da5a47;text-decoration:none}ul.date-list>li>a:before{content:'remove';font-family:Craft, sans-serif}.select-dates-wrapper{display:none}.ui-datepicker{z-index:102 !important} diff --git a/src/Services/EventsService.php b/src/Services/EventsService.php index 07f10ac..86f39c1 100644 --- a/src/Services/EventsService.php +++ b/src/Services/EventsService.php @@ -32,9 +32,9 @@ class EventsService extends Component * @param int $siteId * @param bool $includeDisabled * - * @return Event|ElementInterface + * @return Event|ElementInterface|null */ - public function getEventById(int $eventId, int $siteId = null, bool $includeDisabled = false): Event + public function getEventById(int $eventId, int $siteId = null, bool $includeDisabled = false) { $query = Event::find() ->setAllowedCalendarsOnly(false) @@ -56,9 +56,9 @@ public function getEventById(int $eventId, int $siteId = null, bool $includeDisa * @param int $siteId * @param bool $includeDisabled * - * @return Event|ElementInterface + * @return Event|ElementInterface|null */ - public function getEventBySlug(string $slug, int $siteId = null, bool $includeDisabled = false): Event + public function getEventBySlug(string $slug, int $siteId = null, bool $includeDisabled = false) { return Event::find() ->slug($slug) @@ -385,7 +385,7 @@ public function canEditEvent($event): bool $eventModel = $this->getEventById($event); } - if (null === $eventModel && null !== $guestAccess) { + if ((null === $eventModel || !$eventModel->id) && null !== $guestAccess) { return true; } diff --git a/src/codepack/templates/layouts/_layout.html b/src/codepack/templates/layouts/_layout.html index a37580c..de8bb65 100755 --- a/src/codepack/templates/layouts/_layout.html +++ b/src/codepack/templates/layouts/_layout.html @@ -34,7 +34,7 @@ {% block footer %} {% endblock %} diff --git a/src/templates/codepack/index.html b/src/templates/codepack/index.html index 020231b..6e80263 100644 --- a/src/templates/codepack/index.html +++ b/src/templates/codepack/index.html @@ -21,6 +21,8 @@ {% endmacro %} {% import _self as dir %} +{% block actionButton %}{% endblock %} + {% block content %}

{{ "Demo Templates"|t('calendar') }}

@@ -34,7 +36,7 @@

{{ "Demo Templates"|t('calendar') }}

{{ forms.textField({ - label: "Prefix"|t('calendar'), + label: "Install Path"|t('calendar'), id: 'prefix', name: 'prefix', value: prefix, diff --git a/src/templates/layouts/_settings.html b/src/templates/layouts/_settings.html index 599b522..56f0268 100644 --- a/src/templates/layouts/_settings.html +++ b/src/templates/layouts/_settings.html @@ -1,8 +1,8 @@ {% extends "calendar/layouts/_layoutWithoutSettings" %} {% set selectedSubnavItem = 'settings' %} - {% set title = "Calendar Settings"|t('calendar') %} +{% set fullPageForm = true %} {% set navItems = { 'hd': { heading: "Settings"|t('calendar') }, @@ -15,6 +15,14 @@ {% set selectedItem = craft.app.request.getSegment(3)|default %} {% set docTitle = navItems[selectedItem].title~' - '~title %} +{% block actionButton %} +
+
+ +
+
+{% endblock %} + {% block sidebar %}