function imagefield_gallery_content_types_edit($type, $field){
$cache = imagefield_gallery_get_imagecache_presets();
$form_func = 'imagefield_gallery_'. $var[$type][$field]['gallery'] .'_content_types';
$form = $form_func($form, $var, $type, $field, $cache);
}
else {
$form[$type][$field] =
array(
'#type' => 'select',
'#title' =>
t('@type @field gallery type',
array('@type' =>
$type,
'@field' =>
$field)),
'#default_value' =>
isset($var[$type][$field]['gallery']) ?
$var[$type][$field]['gallery'] :
'none',
'#options' => imagefield_gallery_get_gallery_types(),
'#description' =>
t('Please select the gallery style you would like for the @type content type @field field.',
array('@type' =>
$type,
'@field' =>
$field)),
'#tree' => TRUE,
);
}
$form['backlink'] =
array(
'#type' => 'markup',
'#value' =>
l('Return to Content Types Admin',
'admin/settings/imagefield_gallery_types') .
'<div style="clear:both;"></div>',
);
}