function messaging_template_admin_settings in Messaging 6.3
Template settings: enable/disable, fallback, etc...
1 string reference to 'messaging_template_admin_settings'
- messaging_template_menu in messaging_template/
messaging_template.module - Implementation of hook_menu()
File
- messaging_template/
messaging_template.admin.inc, line 95 - Messaging Framework - Admin UI
Code
function messaging_template_admin_settings($form_state) {
$fallback_options = array(
'' => '',
) + messaging_template_info(NULL, 'title');
$form['templates'] = array(
'#tree' => TRUE,
'#theme' => 'messaging_template_admin_templates',
);
foreach (messaging_template_info() as $type => $info) {
$form['templates'][$type] = array(
'#type' => 'fieldset',
);
$form['templates'][$type]['module'] = array(
'#type' => 'value',
'#value' => $info['module'],
);
$form['templates'][$type]['enabled'] = array(
'#type' => 'checkbox',
'#default_value' => $info['enabled'],
);
$form['templates'][$type]['fallback'] = array(
'#type' => 'select',
'#options' => $fallback_options,
'#default_value' => !empty($info['fallback']) ? $info['fallback'] : '',
);
}
$form['buttons']['update'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
$form['buttons']['reset'] = array(
'#type' => 'submit',
'#value' => t('Reset to defaults'),
);
return $form;
}