mirror of
https://github.com/netzmacht/contao-leaflet-geocode-widget.git
synced 2025-11-29 12:13:40 +01:00
Merge pull request #9 from qzminski/master
Fix compatibility with Contao 5
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
"source": "https://github.com/contao-bootstrap/core"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.6.0",
|
||||
"contao/core-bundle": "^4.4.0",
|
||||
"php": "^7.4 || ^8.0",
|
||||
"contao/core-bundle": "^4.13 || ^5.0",
|
||||
"netzmacht/contao-leaflet-libraries": "~1.3"
|
||||
},
|
||||
"require-dev": {
|
||||
|
||||
@@ -12,13 +12,17 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\GeocodeWidget\Widget;
|
||||
|
||||
use Contao\BackendTemplate;
|
||||
use Contao\StringUtil;
|
||||
use Contao\Widget;
|
||||
|
||||
/**
|
||||
* Class GeocodeWidget
|
||||
*
|
||||
* @property int size
|
||||
* @property bool multiple
|
||||
*/
|
||||
class GeocodeWidget extends \Widget
|
||||
class GeocodeWidget extends Widget
|
||||
{
|
||||
/**
|
||||
* Submit user input.
|
||||
@@ -111,12 +115,12 @@ class GeocodeWidget extends \Widget
|
||||
$buffer = '';
|
||||
|
||||
for ($index = 0; $index < $this->size; $index++) {
|
||||
$template = new \BackendTemplate($this->widgetTemplate);
|
||||
$template = new BackendTemplate($this->widgetTemplate);
|
||||
$template->setData(
|
||||
[
|
||||
'wrapperClass' => $wrapperClass,
|
||||
'widget' => $this,
|
||||
'value' => \StringUtil::specialchars($this->value[$index]),
|
||||
'value' => StringUtil::specialchars($this->value[$index]),
|
||||
'class' => $this->strClass ? ' ' . $this->strClass : '',
|
||||
'id' => $this->strId . (($this->size > 1) ? '_' . $index : ''),
|
||||
'name' => $this->strName . (($this->size > 1) ? '[]' : ''),
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
namespace Netzmacht\Contao\Leaflet\GeocodeWidget\Widget;
|
||||
|
||||
use Contao\BackendTemplate;
|
||||
use Contao\StringUtil;
|
||||
use Contao\TextField;
|
||||
|
||||
/**
|
||||
@@ -66,7 +67,7 @@ class RadiusWidget extends TextField
|
||||
[
|
||||
'wrapperClass' => trim($wrapperClass),
|
||||
'widget' => $this,
|
||||
'value' => \StringUtil::specialchars($this->value[$index]),
|
||||
'value' => StringUtil::specialchars($this->value[$index]),
|
||||
'class' => $this->strClass ? ' ' . $this->strClass : '',
|
||||
'id' => $this->strId . (($this->size > 1) ? '_' . $index : ''),
|
||||
'name' => $this->strName . (($this->size > 1) ? '[]' : ''),
|
||||
|
||||
Reference in New Issue
Block a user