function imagecache_proportions_colorbox_form in Imagecache Proportions 7
Retrieves and processes colorbox formatter settings.
1 call to imagecache_proportions_colorbox_form()
File
- ./
imagecache_proportions.module, line 261 - Field formatter for image fields that allows the user to select between 3 different image styles depending on the proportions of the original image uploaded. One style would be squared for more or less squared images, another for wider images and the…
Code
function imagecache_proportions_colorbox_form($field, $instance, $view_mode, $form, &$form_state) {
$instance['display'][$view_mode]['settings'] = $instance['display'][$view_mode]['settings']['colorbox'];
$form = colorbox_field_formatter_settings_form($field, $instance, $view_mode, $form, $form_state);
$form['colorbox_caption_custom']['#states']['visible'] = array(
':input[name$="[settings_edit_form][settings][colorbox][colorbox_caption]"]' => array(
'value' => 'custom',
),
);
$form['colorbox_gallery_custom']['#states']['visible'] = array(
':input[name$="[settings_edit_form][settings][colorbox][colorbox_gallery]"]' => array(
'value' => 'custom',
),
);
unset($form['colorbox_node_style']);
return $form;
}