Skip to content

Commit

Permalink
Merge pull request #716 from ezsystems/ezp-29728-fix-longitude-latitu…
Browse files Browse the repository at this point in the history
…de-validation-on-edit

EZP-29728: Longitude validation appears when user try to publish after editing
  • Loading branch information
Łukasz Serwatka authored Nov 15, 2018
2 parents 4e855ee + 8ad996d commit cc777a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,9 @@
};
const map = Leaflet.map(field.querySelector('.ez-data-source__map'), mapConfig);

longitudeInput.value = longitudeInput.dataset.value.replace(',', '.');
latitudeInput.value = latitudeInput.dataset.value.replace(',', '.');

/**
* Updates map state to show location with provided coordinates
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<div class="form-control-label">{{ 'content.field_type.ezgmaplocation.set_current_location'|trans|desc('Set current location') }}</div>
<button type="button" class="btn btn-secondary">{{ 'content.field_type.ezgmaplocation.locate_me'|trans|desc('Locate me') }}</button>
</div>
{{ form_row(form.latitude) }}
{{ form_row(form.longitude) }}
{{ form_row(form.latitude, { 'attr': { 'data-value': form.latitude.vars.value }}) }}
{{ form_row(form.longitude, { 'attr': { 'data-value': form.longitude.vars.value }}) }}
<div class="ez-data-source__field ez-data-source__field--address">
<div class="ez-data-source__label-wrapper">
{{ form_label(form.address, form.address.vars.label, {'label_attr': {'class': 'ez-data-source__label'}}) }}
Expand Down

0 comments on commit cc777a4

Please sign in to comment.