function imageeditor_settings_form in Image Editor 6
Same name and namespace in other branches
- 7 imageeditor.admin.inc \imageeditor_settings_form()
Imageeditor module API keys form.
1 string reference to 'imageeditor_settings_form'
- imageeditor_menu in ./
imageeditor.module - Implementation of hook_menu().
File
- ./
imageeditor.module, line 58 - Allows online editing of images using different image editing services.
Code
function imageeditor_settings_form() {
$form = array();
$form['title'] = array(
'#type' => 'item',
'#title' => t('API keys'),
'#description' => t('Enter API keys for needed image editors and upload services. These keys are global for the whole site.'),
);
foreach (imageeditor_api_keys() as $codename => $api_key) {
$form[$codename . '_display_name'] = array(
'#type' => 'markup',
'#value' => $api_key['display_name'],
);
$form[$codename] = array(
'#type' => 'textfield',
'#default_value' => variable_get($codename, ''),
'#size' => 50,
'#maxlength' => 100,
'#required' => FALSE,
);
$form[$codename . '_description'] = array(
'#type' => 'markup',
'#value' => $api_key['description'],
);
$form[$codename . '_link'] = array(
'#type' => 'markup',
'#value' => '<a href="' . $api_key['link'] . '" target="_blank">' . $api_key['link'] . '</a>',
);
}
$form = system_settings_form($form);
$form['#theme'] = 'imageeditor_settings_form';
return $form;
}