function autosave_admin_settings in Autosave 5
Same name and namespace in other branches
- 5.3 autosave.module \autosave_admin_settings()
- 5.2 autosave.module \autosave_admin_settings()
- 6.2 autosave.module \autosave_admin_settings()
- 6 autosave.module \autosave_admin_settings()
- 7.2 autosave.module \autosave_admin_settings()
- 7 autosave.module \autosave_admin_settings()
Menu callback; return the autosave module settings form.
1 string reference to 'autosave_admin_settings'
- autosave_menu in ./
autosave.module - Implementation of hook_menu().
File
- ./
autosave.module, line 91 - Automatically saves a node after a period of time.
Code
function autosave_admin_settings() {
$types = node_get_types();
$path = drupal_get_path('module', 'autosave');
if (!file_exists($path . '/jquery.field.js')) {
drupal_set_message(t('Unable to find the jQuery Field Plugin in !path. Please <a href="http://plugins.jquery.com/files/jquery.field.js_4.txt">download jquery.field.js</a> and place it into !path.', array(
'!path' => $path,
)), 'error');
}
$form['autosave_period'] = array(
'#type' => 'textfield',
'#title' => t('Autosave after this amount seconds has passed'),
'#default_value' => variable_get('autosave_period', 10),
);
return system_settings_form($form);
}