Make the map input text field title invisible.
This commit is contained in:
parent
b6744a3cd3
commit
388a0f43b1
|
@ -85,6 +85,7 @@ class FarmMapInput extends FormElement {
|
|||
$element['value'] = [
|
||||
'#type' => $display_raw_geometry ? 'textarea' : 'hidden',
|
||||
'#title' => $element_title . ' ' . t('WKT'),
|
||||
'#title_display' => 'invisible',
|
||||
'#attributes' => [
|
||||
'data-map-geometry-field' => TRUE,
|
||||
],
|
||||
|
|
|
@ -31,11 +31,13 @@ class MapFormTest extends FarmBrowserTestBase {
|
|||
$this->drupalLogin($user);
|
||||
|
||||
// Go to the test quick form and confirm that both of the geometry fields
|
||||
// are visible.
|
||||
// are visible, and only the second field's WKT text field is visible.
|
||||
$this->drupalGet('quick/test');
|
||||
$this->assertSession()->statusCodeEquals(200);
|
||||
$this->assertSession()->pageTextContains($this->t('Geometry 1'));
|
||||
$this->assertSession()->pageTextContains($this->t('Geometry 2'));
|
||||
$this->assertSession()->pageTextNotContains($this->t('Geometry 1 WKT'));
|
||||
$this->assertSession()->pageTextContains($this->t('Geometry 2 WKT'));
|
||||
|
||||
// Submit the form with a value for the second geometry.
|
||||
$edit = ['geometry2[value]' => 'POINT(-45.967095060886315 32.77503850904169)'];
|
||||
|
|
Loading…
Reference in New Issue