Add an wizard callback listener for the radius field.

Fix readme markup.

Add missing wizard class.
This commit is contained in:
David Molineus
2018-02-08 22:23:42 +01:00
parent be820179de
commit 617a996e0e
5 changed files with 107 additions and 1 deletions

View File

@@ -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 \'\''
];
```