From a6c08ae8e529ef4f0dd94fe743f3e0fe08ae8320 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Wed, 13 Feb 2019 12:46:19 +0100 Subject: [PATCH] Fix #71: Using multiple edit to copy entities leads to invalid aliases. Do not copy aliases at all. --- CHANGELOG.md | 3 ++- src/Bundle/Resources/contao/dca/tl_leaflet_control.php | 1 + src/Bundle/Resources/contao/dca/tl_leaflet_icon.php | 9 ++++++++- src/Bundle/Resources/contao/dca/tl_leaflet_layer.php | 9 ++++++++- src/Bundle/Resources/contao/dca/tl_leaflet_map.php | 9 ++++++++- src/Bundle/Resources/contao/dca/tl_leaflet_marker.php | 9 ++++++++- src/Bundle/Resources/contao/dca/tl_leaflet_popup.php | 9 ++++++++- src/Bundle/Resources/contao/dca/tl_leaflet_style.php | 9 ++++++++- src/Bundle/Resources/contao/dca/tl_leaflet_vector.php | 9 ++++++++- 9 files changed, 59 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe55d06..818a429 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix ordering changes in layer control element aren't recognized ([#72](https://github.com/netzmacht/contao-leaflet-maps/issues/72)) - Fix markers with negative coordinates aren't displayed ([#74](https://github.com/netzmacht/contao-leaflet-maps/issues/74)) - - Fix image icon with non existing image throws exception ([#75])(https://github.com/netzmacht/contao-leaflet-maps/issues/75)) + - Fix image icon with non existing image throws exception ([#75](https://github.com/netzmacht/contao-leaflet-maps/issues/75)) + - Fix invalid alias then using multiple edit. Aliases aren't copied anymore. ([#71](https://github.com/netzmacht/contao-leaflet-maps/issues/71)) ## [3.1.3] - 2019-01-10 diff --git a/src/Bundle/Resources/contao/dca/tl_leaflet_control.php b/src/Bundle/Resources/contao/dca/tl_leaflet_control.php index b5403f1..39488af 100644 --- a/src/Bundle/Resources/contao/dca/tl_leaflet_control.php +++ b/src/Bundle/Resources/contao/dca/tl_leaflet_control.php @@ -164,6 +164,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = [ 'maxlength' => 255, 'tl_class' => 'w50', 'nullIfEmpty' => true, + 'doNotCopy' => true, ], 'toolkit' => [ 'alias_generator' => [ diff --git a/src/Bundle/Resources/contao/dca/tl_leaflet_icon.php b/src/Bundle/Resources/contao/dca/tl_leaflet_icon.php index 3e99465..bcd2de8 100644 --- a/src/Bundle/Resources/contao/dca/tl_leaflet_icon.php +++ b/src/Bundle/Resources/contao/dca/tl_leaflet_icon.php @@ -179,7 +179,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = [ ['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'], ['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'], ], - 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true], + 'eval' => [ + 'mandatory' => false, + 'maxlength' => 255, + 'tl_class' => 'w50', + 'unique' => true, + 'doNotCopy' => true, + 'nullIfEmpty' => true, + ], 'toolkit' => [ 'alias_generator' => [ 'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default', diff --git a/src/Bundle/Resources/contao/dca/tl_leaflet_layer.php b/src/Bundle/Resources/contao/dca/tl_leaflet_layer.php index 2f07840..20e37ce 100644 --- a/src/Bundle/Resources/contao/dca/tl_leaflet_layer.php +++ b/src/Bundle/Resources/contao/dca/tl_leaflet_layer.php @@ -278,7 +278,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [ ['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'], ['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'], ], - 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true], + 'eval' => [ + 'mandatory' => false, + 'maxlength' => 255, + 'tl_class' => 'w50', + 'unique' => true, + 'nullIfEmpty' => true, + 'doNotCopy' => true, + ], 'toolkit' => [ 'alias_generator' => [ 'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default', diff --git a/src/Bundle/Resources/contao/dca/tl_leaflet_map.php b/src/Bundle/Resources/contao/dca/tl_leaflet_map.php index c293b32..2a6c615 100644 --- a/src/Bundle/Resources/contao/dca/tl_leaflet_map.php +++ b/src/Bundle/Resources/contao/dca/tl_leaflet_map.php @@ -157,7 +157,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = [ ['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'], ['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'], ], - 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true], + 'eval' => [ + 'mandatory' => false, + 'maxlength' => 255, + 'tl_class' => 'w50', + 'unique' => true, + 'doNotCopy' => true, + 'nullIfEmpty' => true, + ], 'toolkit' => [ 'alias_generator' => [ 'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default', diff --git a/src/Bundle/Resources/contao/dca/tl_leaflet_marker.php b/src/Bundle/Resources/contao/dca/tl_leaflet_marker.php index 0b24991..d8a6556 100644 --- a/src/Bundle/Resources/contao/dca/tl_leaflet_marker.php +++ b/src/Bundle/Resources/contao/dca/tl_leaflet_marker.php @@ -160,7 +160,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = [ ['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'], ['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'], ], - 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true], + 'eval' => [ + 'mandatory' => false, + 'maxlength' => 255, + 'tl_class' => 'w50', + 'unique' => true, + 'doNotCopy' => true, + 'nullIfEmpty' => true, + ], 'toolkit' => [ 'alias_generator' => [ 'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default', diff --git a/src/Bundle/Resources/contao/dca/tl_leaflet_popup.php b/src/Bundle/Resources/contao/dca/tl_leaflet_popup.php index b40f21d..2aca701 100644 --- a/src/Bundle/Resources/contao/dca/tl_leaflet_popup.php +++ b/src/Bundle/Resources/contao/dca/tl_leaflet_popup.php @@ -151,7 +151,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = [ ['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'], ['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'], ], - 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true], + 'eval' => [ + 'mandatory' => false, + 'maxlength' => 255, + 'tl_class' => 'w50', + 'unique' => true, + 'doNotCopy' => true, + 'nullIfEmpty' => true, + ], 'toolkit' => [ 'alias_generator' => [ 'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default', diff --git a/src/Bundle/Resources/contao/dca/tl_leaflet_style.php b/src/Bundle/Resources/contao/dca/tl_leaflet_style.php index 8a10177..12033c8 100644 --- a/src/Bundle/Resources/contao/dca/tl_leaflet_style.php +++ b/src/Bundle/Resources/contao/dca/tl_leaflet_style.php @@ -145,7 +145,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_style'] = [ ['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'], ['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'], ], - 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true], + 'eval' => [ + 'mandatory' => false, + 'maxlength' => 255, + 'tl_class' => 'w50', + 'unique' => true, + 'doNotCopy' => true, + 'nullIfEmpty' => true, + ], 'toolkit' => [ 'alias_generator' => [ 'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default', diff --git a/src/Bundle/Resources/contao/dca/tl_leaflet_vector.php b/src/Bundle/Resources/contao/dca/tl_leaflet_vector.php index 4e2fe66..543b26f 100644 --- a/src/Bundle/Resources/contao/dca/tl_leaflet_vector.php +++ b/src/Bundle/Resources/contao/dca/tl_leaflet_vector.php @@ -185,7 +185,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = [ ['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'], ['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'], ], - 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true], + 'eval' => [ + 'mandatory' => false, + 'maxlength' => 255, + 'tl_class' => 'w50', + 'unique' => true, + 'doNotCopy' => true, + 'nullIfEmpty' => true, + ], 'toolkit' => [ 'alias_generator' => [ 'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default',