function spaces_customtext_settings_form in Spaces 6.3
Same name and namespace in other branches
- 7.3 spaces_customtext/spaces_customtext.admin.inc \spaces_customtext_settings_form()
- 7 spaces_customtext/spaces_customtext.admin.inc \spaces_customtext_settings_form()
System settings form for custom text strings.
1 string reference to 'spaces_customtext_settings_form'
- spaces_customtext_menu in spaces_customtext/
spaces_customtext.module - Implementation of hook_menu().
File
- spaces_customtext/
spaces_customtext.admin.inc, line 6
Code
function spaces_customtext_settings_form($form_state, $feature) {
global $language;
$langcode = $language->language;
$custom_strings = variable_get("locale_custom_strings_{$langcode}", array());
$strings = spaces_customtext_feature_strings($feature);
if (!empty($strings)) {
foreach ($strings as $original) {
// Start with the feature name.
$form[$original] = array(
'#type' => 'textfield',
'#title' => check_plain($original),
'#default_value' => isset($custom_strings[$original]) ? $custom_strings[$original] : '',
);
}
$master["locale_custom_strings_{$langcode}"] = $form;
$master["locale_custom_strings_{$langcode}"]['#tree'] = TRUE;
$master["locale_custom_strings_{$langcode}"]['#theme'] = 'spaces_customtext_settings_form';
$master["locale_custom_strings_{$langcode}"]['#element_validate'] = array(
'spaces_customtext_settings_validate',
);
$master["locale_custom_strings_{$langcode}"]['#custom_strings'] = $custom_strings;
$master = system_settings_form($master);
return $master;
}
drupal_not_found();
exit;
}