You are here

function fc_settings in Field Complete 7

@file Field Complete - Provides field-based completeness for any entity - admin.

1 string reference to 'fc_settings'
_fc_menu in ./fc.registry.inc
Implements hook_menu().

File

./fc.admin.inc, line 7
Field Complete - Provides field-based completeness for any entity - admin.

Code

function fc_settings($form, &$form_state) {
  $form['fc_tooltip_icon'] = array(
    '#type' => 'textfield',
    '#title' => t('Field complete marker'),
    '#description' => t('This is the symbol that is placed after the field label to indicate it\'s a field-complete field. Use a full HTML reference.'),
    '#default_value' => variable_get('fc_tooltip_icon', '†'),
  );
  $form['fc_tooltip'] = array(
    '#type' => 'textfield',
    '#title' => t('Tooltip'),
    '#description' => t('This is the tooltip message that appears when hovering over the field complete marker.'),
    '#default_value' => variable_get('fc_tooltip', 'This field can be left blank but adds to the completeness of this item.'),
  );
  $entity_types = array();
  foreach (fc_entity_types() as $entity_type => $entity_info) {
    $entity_types[$entity_type] = $entity_info['label'];
  }
  $form['fc_entity_types'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Entity types'),
    '#description' => t('Choose which entity types you want to use field complete with.'),
    '#options' => $entity_types,
    '#default_value' => variable_get('fc_entity_types', array(
      'node' => 'node',
      'user' => 'user',
    )),
    '#required' => TRUE,
  );
  $form['fc_js_ids'] = array(
    '#type' => 'checkbox',
    '#title' => t('Add field IDs to page'),
    '#description' => t('If checked the Field Complete module adds any form fields that are set for field completeness to Drupal settings (Drupal.settings.ec.ids).'),
    '#default_value' => variable_get('fc_js_ids', FALSE),
  );
  return system_settings_form($form);
}