mirror of
https://github.com/netzmacht/contao-leaflet-geocode-widget.git
synced 2025-12-02 05:33:40 +01:00
Add an wizard callback listener for the radius field.
Fix readme markup. Add missing wizard class.
This commit is contained in:
22
README.md
22
README.md
@@ -94,3 +94,25 @@ $GLOBALS['TL_DCA']['tl_page']['fields']['radius'] = [
|
||||
'sql' => 'varchar(255) NOT NULL default \'\''
|
||||
];
|
||||
```
|
||||
|
||||
If you want to add an wizard icon to the radius field as well, a wizard is shipped with. You only have to add the
|
||||
callback and define the coordinates field relation.
|
||||
|
||||
```php
|
||||
$GLOBALS['TL_DCA']['tl_page']['fields']['radius'] = [
|
||||
'label' => ['Radius', 'Angabe des Radius in Metern'],
|
||||
'inputType' => 'text',
|
||||
'eval' => [
|
||||
'rgxp' => 'natural',
|
||||
'default' => 500,
|
||||
'minval' => 100,
|
||||
'maxval' => 5000,
|
||||
'tl_class' => 'w50 wizard',
|
||||
'coordinates' => 'coordinates'
|
||||
],
|
||||
'wizard' => [
|
||||
['netzmacht.contao_leaflet_geocode.listeners.radius_wizard', 'generateWizard'],
|
||||
],
|
||||
'sql' => 'varchar(255) NOT NULL default \'\''
|
||||
];
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user