function datepicker_block_block_configure in Datepicker 7
Implements hook_block_configure().
File
- datepicker_block/
datepicker_block.module, line 18
Code
function datepicker_block_block_configure($delta = '') {
$form = array();
$form['datepicker_block_path'] = array(
'#title' => t('Form action path'),
'#type' => 'textfield',
'#description' => t('Enter the path you want to use as the form action.'),
);
$form['datepicker_block_path_current'] = array(
'#title' => t('Use current path'),
'#type' => 'checkbox',
'#description' => t('Use the current path as the form action (overrides "form action path").'),
);
$form['datepicker_block_field_type'] = array(
'#title' => t('Populate date field type'),
'#type' => 'select',
'#options' => array(
'single' => t('Single date'),
'range' => t('Date range'),
'multiple' => t('Multiple date fields'),
),
);
$form['datepicker_block_identifier'] = array(
'#title' => t('Filter identifier'),
'#type' => 'textfield',
'#description' => t('The filter key to populate from this block. If using multiple datefields separate them with a | character, eg date_from|date_to'),
);
$form['datepicker_block_format'] = array(
'#title' => t('Date format'),
'#type' => 'textfield',
'#description' => t('The PHP date format that is used in the query string.'),
);
foreach (array_keys($form) as $key) {
$form[$key]['#default_value'] = datepicker_block_defaults(substr($key, strlen('datepicker_block_')));
}
return $form;
}