You are here

function openlayers_ui_layers_import_form in Openlayers 6.2

Import a preset from cut & paste

1 string reference to 'openlayers_ui_layers_import_form'
openlayers_ui_menu in modules/openlayers_ui/openlayers_ui.module
Implementation of hook_menu

File

modules/openlayers_ui/includes/openlayers_ui.layers.inc, line 174
This file holds the functions handling layers in the Openlayers UI.

Code

function openlayers_ui_layers_import_form($form_state) {
  $form['name'] = array(
    '#type' => 'textfield',
    '#title' => t('Layers name'),
    '#description' => t('Enter the name to use for this layer if it is different from the source layer. Leave blank to use the name of the layer.'),
  );
  $form['layer'] = array(
    '#type' => 'textarea',
    '#title' => t('Paste layer code here'),
    '#required' => TRUE,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Import'),
    '#submit' => array(
      'openlayers_ui_layers_import_submit',
    ),
    '#validate' => array(
      'openlayers_ui_layers_import_validate',
    ),
  );
  return $form;
}