You are here

function farm_access_settings_form in farmOS 7

Access settings form.

1 string reference to 'farm_access_settings_form'
farm_access_menu in modules/farm/farm_access/farm_access.module
Implements hook_menu().

File

modules/farm/farm_access/farm_access.module, line 199
Farm Access module.

Code

function farm_access_settings_form($form, &$form_state) {

  // Metric or US/Imperial.
  $form['farm_access_allow_origin'] = array(
    '#type' => 'textarea',
    '#title' => t('Access-Control-Allow-Origin'),
    '#description' => t('This will be put in the Access-Control-Allow-Origin header, which is necessary for third-party client-side applications to access farmOS data via the API. The default allows access from the farmOS Field Kit application. Multiple origins can be specified (one per line) and they will be matched automatically.'),
    '#default_value' => variable_get('farm_access_allow_origin', FARM_ACCESS_DEFAULT_ALLOWED_ORIGINS),
  );

  // Return it as a system settings form.
  return system_settings_form($form);
}