You are here

function exif_custom_settings_form_user in EXIF Custom 7

User settings form.

1 string reference to 'exif_custom_settings_form_user'
exif_custom_menu in ./exif_custom.module
Implements hook_menu().

File

./exif_custom.user.inc, line 11
Functionality related to the user settings.

Code

function exif_custom_settings_form_user($form, $form_state) {
  $mappings = _exif_custom_get_maps();
  $options = array();
  $options['none'] = '';
  if (!empty($mappings)) {
    while ($result = $mappings
      ->fetchObject()) {
      $options[$result->mid] = $result->name;
    }
    $form['user-default'] = array(
      '#type' => 'select',
      '#title' => 'Personal default mapping',
      '#default_value' => exif_custom_get_user_default(),
      '#options' => $options,
    );
    $form['actions']['submit'] = array(
      '#value' => 'Save',
      '#type' => 'submit',
    );
    $form['#submit'][] = 'exif_custom_settings_form_user_submit';
  }
  else {
    drupal_set_message(t('No mappings have been created yet.'));
  }
  return $form;
}