Problem/Motivation

In GeolocationLatlngWidget, the field's descriptions are shown only if the field has a value.
They don't mention Decimal format.

The field's descriptions were added in #2764043: GPS value input notation?.

Proposed resolution

I would always show them or show them only when the field is empty.
I would change the description to "Decimal format (eg. %decimal) or Sexagesimal (DMS) format (eg. %sexagesimal)".

Translations changes

<span>Sexagesimal/DMS notation value: %sexagesimal</span> changes to
<span>Decimal format (eg. %decimal) or Sexagesimal (DMS) format (eg. %sexagesimal)</span>

Comments

mfernea created an issue. See original summary.

mfernea’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new2.31 KB

Here is the patch.

mfernea’s picture

Issue summary: View changes

Status: Needs review » Needs work

The last submitted patch, 2: geolocation-lat-lng-description-2858089-2.patch, failed testing.

christianadamski’s picture

Hey,

why did you remove the #default_value property? These are pretty important, aren't they?

christianadamski’s picture

Status: Needs work » Needs review
StatusFileSize
new627 bytes

Re-added #default_value and altered message slightly

Status: Needs review » Needs work

The last submitted patch, 6: 2858089-6-better-format-description.patch, failed testing.

mfernea’s picture

Actually the #default_value property was not removed. In the patch there is a double assignment.
$lat_example = $element['lat']['#default_value'] = $items[$delta]->lat;

christianadamski’s picture

Status: Needs work » Needs review
StatusFileSize
new2.06 KB

Removed double assignment and correctly exported patch

  • mfernea authored cca9055 on 8.x-1.x
    Issue #2858089 by ChristianAdamski, mfernea: Latitude and Longitude...
christianadamski’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.