function focal_point_configuration_form in Focal Point 7
System form for focal point configuration settings.
1 string reference to 'focal_point_configuration_form'
- focal_point_menu in ./
focal_point.module - Implements hook_menu().
File
- ./
focal_point.admin.inc, line 11 - Functionality needed by the focal point admin pages.
Code
function focal_point_configuration_form($form, &$form_state) {
$default_options = array();
$default_info = focal_point_get_default_method_info();
foreach ($default_info as $key => $info) {
$default_options[$key] = check_plain($info['label']);
}
$form['focal_point_default_method'] = array(
'#type' => 'select',
'#title' => t('Calculate intial focal point using'),
'#descrition' => t('This can slow down your site, especially if you are bulk uploading images.'),
'#options' => array(
'' => t('Disabled'),
) + $default_options,
'#default_value' => variable_get('focal_point_default_method', ''),
'#access' => !empty($default_options),
);
$options = array(
'image' => t('Standard image fields'),
'media' => t('Media module image fields'),
);
// @todo consider allowing $options to be altered.
$form['focal_point_enabled_for'] = array(
'#type' => 'checkboxes',
'#title' => 'Enable focal point for the following:',
'#options' => $options,
'#default_value' => variable_get('focal_point_enabled_for', array_keys($options)),
);
$form['focal_point_test_drive_link'] = array(
'#type' => 'markup',
'#markup' => l(t('Take a test drive'), 'focal_point/test-drive'),
);
return system_settings_form($form);
}