Skip to content

Commit

Permalink
v3.6.24
Browse files Browse the repository at this point in the history
  • Loading branch information
OFFLINE committed Sep 10, 2024
1 parent 98f9441 commit d499375
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 51 deletions.
18 changes: 0 additions & 18 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
use OFFLINE\Boxes\Models\BoxesSetting;
use OFFLINE\Boxes\Models\Content;
use OFFLINE\Boxes\Models\Page;
use RainLab\Translate\Classes\Translator;
use System\Classes\PluginBase;
use Url;

Expand Down Expand Up @@ -130,23 +129,6 @@ public function boot()
}
}

// Remove URL prefix, legacy support for RainLab.Translate,
if (class_exists(\RainLab\Translate\Models\Locale::class)) {
$translator = Translator::instance();

if ($translator->loadLocaleFromRequest() && $locale = $translator->getLocale()) {
$prefix = "/{$locale}";

if ($url === $prefix || str_starts_with($url, $prefix . '/')) {
$url = str_replace($prefix, '', $url);
}

if ($url === '') {
$url = '/';
}
}
}

if (str_contains($url, Controller::PREVIEW_URL) && BackendAuth::getUser()) {
return Controller::instance()->getPreviewPage($url);
}
Expand Down
26 changes: 26 additions & 0 deletions assets/editor/assets/main-30e90e19.js

Large diffs are not rendered by default.

26 changes: 0 additions & 26 deletions assets/editor/assets/main-f228dc83.js

This file was deleted.

2 changes: 1 addition & 1 deletion assets/editor/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"css": [
"assets/main-b85d2a9c.css"
],
"file": "assets/main-f228dc83.js",
"file": "assets/main-30e90e19.js",
"isEntry": true,
"src": "src/main.ts"
}
Expand Down
9 changes: 5 additions & 4 deletions formwidgets/BoxFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Backend\Classes\FormWidgetBase;
use Backend\Widgets\Form;
use Illuminate\Support\Facades\Lang;
use OFFLINE\Boxes\Models\Box;
use OFFLINE\Boxes\Models\Page;

Expand Down Expand Up @@ -40,17 +41,17 @@ public function init()
'fields' => [
'reference_page' => [
'type' => 'dropdown',
'label' => 'Seite',
'emptyOption' => '-- Bitte wählen',
'label' => Lang::get('offline.boxes::lang.page'),
'emptyOption' => '-- ' . Lang::get('offline.boxes::lang.please_select'),
'options' => 'OFFLINE\Boxes\FormWidgets\BoxFinder::getPageOptions',
'value' => post(self::PREFIX . '.reference_page'),
// TODO: This is somehow registered for each Box on the page and results in one request per box.
'changeHandler' => 'onReferencePageChange',
],
'reference_box' => [
'type' => 'dropdown',
'label' => 'Box',
'emptyOption' => '-- Bitte wählen',
'label' => Lang::get('offline.boxes::lang.box'),
'emptyOption' => '-- ' . Lang::get('offline.boxes::lang.please_select'),
'options' => 'OFFLINE\Boxes\FormWidgets\BoxFinder::getBoxOptions',
'trigger' => [
'action' => 'hide',
Expand Down
4 changes: 2 additions & 2 deletions updates/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -406,5 +406,5 @@
- "Added sections overview to Partial selection modal"
3.6.22:
- "Optimized page list"
3.6.23:
- "Optimized RainLab.Translate <2.0 Support"
3.6.24:
- "Added translation strings in BoxFinder form widget"

0 comments on commit d499375

Please sign in to comment.