You are here

function freelinking_prepopulate_node_settings in Freelinking 6.3

Same name and namespace in other branches
  1. 7.3 modules/freelinking_prepopulate/freelinking_prepopulate.module \freelinking_prepopulate_node_settings()

Settings callback for "Create Node"

1 string reference to 'freelinking_prepopulate_node_settings'
freelinking_prepopulate_freelinking in modules/freelinking_prepopulate/freelinking_prepopulate.module

File

modules/freelinking_prepopulate/freelinking_prepopulate.module, line 89

Code

function freelinking_prepopulate_node_settings() {
  $form['freelinking_prepopulate_node_type'] = array(
    '#type' => 'select',
    '#title' => t('Default Type to Create'),
    '#default_value' => variable_get('freelinking_prepopulate_node_type', _freelinking_prepopulate_default_node_type()),
    '#options' => node_get_types('names'),
    '#description' => t('Which content type should be created by Freelinking?'),
  );
  foreach (freelinking_prepopulate_list_fields('nodecreate') as $key => $value) {
    $options[$key] = $value['title'];
  }
  if (empty($options)) {
    return $form;
  }
  $form['freelinking_prepopulate_node_advanced'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Advanced Options'),
    '#default_value' => variable_get('freelinking_prepopulate_node_advanced', array()),
    '#options' => $options,
    '#description' => t('Use the <em>Linking Node</em> for Create Node presets.'),
  );
  return $form;
}