diff --git a/src/GeocodeWidget.php b/src/GeocodeWidget.php index dcf76fb..de6f8b8 100644 --- a/src/GeocodeWidget.php +++ b/src/GeocodeWidget.php @@ -63,13 +63,13 @@ class GeocodeWidget extends \Widget if ( // See: http://stackoverflow.com/a/18690202 !preg_match( - '^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)(,[-+]?\d+)?$', + '#^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)(,[-+]?\d+)?$#', $value ) ) { $this->addError( sprintf( - $GLOBALS['TL_LANG']['ERR']['leaflet_invalid_coordinate'], + $GLOBALS['TL_LANG']['ERR']['leafletInvalidCoordinate'], $value ) ); @@ -92,6 +92,7 @@ class GeocodeWidget extends \Widget 'value' => specialchars($this->value), 'class' => $this->strClass ? ' ' . $this->strClass : '', 'id' => $this->strId, + 'name' => $this->strName, 'attributes' => $this->getAttributes(), 'wizard' => $this->wizard, 'label' => $this->strLabel diff --git a/src/Resources/contao/languages/de/default.php b/src/Resources/contao/languages/de/default.php index 4cf55ef..7e95399 100644 --- a/src/Resources/contao/languages/de/default.php +++ b/src/Resources/contao/languages/de/default.php @@ -8,6 +8,6 @@ * */ -$GLOBALS['TL_LANG']['ERR']['leaflet_invalid_coordinate'] = 'Die angegebenen Koordinaten sind ungültig.'; +$GLOBALS['TL_LANG']['ERR']['leafletInvalidCoordinate'] = 'Die angegebenen Koordinaten sind ungültig.'; $GLOBALS['TL_LANG']['MSC']['leafletSearchPositionLabel'] = 'Suchen'; $GLOBALS['TL_LANG']['MSC']['leafletApplyPositionLabel'] = 'Übernehmen';