function resp_img_admin_settings in Responsive images and styles 7
@file Admin settings
1 string reference to 'resp_img_admin_settings'
- resp_img_menu in ./
resp_img.module - Implements hook_menu().
File
- ./
resp_img.admin.inc, line 8 - Admin settings
Code
function resp_img_admin_settings() {
$form = array();
$form['resp_img_default_suffix'] = array(
'#type' => 'textfield',
'#title' => t('Default suffix'),
'#description' => t('Specify the default suffix to use, ex. "_mobile". Make sure you also create the corresponding imagestyles.'),
'#required' => TRUE,
'#default_value' => variable_get('resp_img_default_suffix', ''),
'#size' => 20,
);
$form['resp_img_forceredirect'] = array(
'#type' => 'select',
'#title' => t('Force redirect'),
'#description' => t('Force redirect if cookie is not set.'),
'#required' => TRUE,
'#default_value' => variable_get('resp_img_forceredirect', FALSE),
'#options' => array(
0 => t('No'),
1 => 'Yes',
),
);
$form['resp_img_forceresize'] = array(
'#type' => 'select',
'#title' => t('Force resize'),
'#description' => t('Resize images when browser windows resizes.'),
'#required' => TRUE,
'#default_value' => variable_get('resp_img_forceresize', FALSE),
'#options' => array(
0 => t('No'),
1 => 'Yes',
),
);
$form['resp_img_reloadonresize'] = array(
'#type' => 'select',
'#title' => t('Reload on resize'),
'#description' => t('Reload the page when browser windows resizes, use wisely!'),
'#required' => TRUE,
'#default_value' => variable_get('resp_img_reloadonresize', FALSE),
'#options' => array(
0 => t('No'),
1 => 'Yes',
),
);
$form['resp_img_purgeexpire'] = array(
'#type' => 'select',
'#title' => t('Advanced support for purge/expire'),
'#description' => t('Clear all variants using purge/expire modules.'),
'#required' => TRUE,
'#default_value' => variable_get('resp_img_purgeexpire', FALSE),
'#options' => array(
0 => t('No'),
1 => 'Yes',
),
);
$form['resp_img_block_enabled'] = array(
'#type' => 'checkbox',
'#title' => t('Enable responsive images for blocks.'),
'#description' => t('If checked, the images within blocks will be responsive as well.'),
'#default_value' => variable_get('resp_img_block_enabled', 1),
);
$form['resp_img_use_device_pixel_ratio'] = array(
'#type' => 'checkbox',
'#title' => t('Use device pixel ratio'),
'#description' => t('Take the device pixel ratio in to account when calculating the right suffix. !link', array(
'!link' => l('Click here for more information.', 'http://drupal.org/node/1550054'),
)),
'#default_value' => variable_get('resp_img_use_device_pixel_ratio', FALSE),
);
return system_settings_form($form);
}