function datex_schema_edit_form_submit in Datex 7.2
Form submit callback for: datex_schema_edit_form().
1 string reference to 'datex_schema_edit_form_submit'
- datex_schema_edit_form in ./
datex.admin.inc - Menu callback, Admin form for editing datex schema.
File
- ./
datex.admin.inc, line 347
Code
function datex_schema_edit_form_submit($form, $form_state) {
$v = $form_state['values'];
$name = $v['name'];
$schema = variable_get('datex_schema');
foreach (language_list() as $lang) {
$code = $lang->language;
if ($v['datex_' . $code] == '0') {
if (isset($schema[$name][$code])) {
unset($schema[$name][$code]);
}
}
else {
$schema[$name][$code] = $v[$code . '_calendar'];
}
}
variable_set('datex_schema', $schema);
$message = t('New configuration for @schema schema saved.', array(
'@schema' => $name,
));
drupal_set_message($message);
}