function ad_report_range_form in Advertisement 5.2
Same name and namespace in other branches
- 6.3 report/ad_report.module \ad_report_range_form()
- 6.2 report/ad_report.module \ad_report_range_form()
- 7 report/ad_report.module \ad_report_range_form()
Return a form for selecting a date range for generating a report.
1 string reference to 'ad_report_range_form'
- ad_report_bargraph in report/
ad_report.module - Page to display ad with bargraph.
File
- report/
ad_report.module, line 406 - Provides comprehensive charts and reports about advertising statistics.
Code
function ad_report_range_form($type, $url = NULL, $start = NULL, $end = NULL) {
$form = array();
$start = $start ? $start : _ad_report_first_day_of_month();
$end = $end ? $end : _ad_report_last_day_of_month();
$form['report'] = array(
'#type' => 'fieldset',
'#title' => t('Report dates'),
'#prefix' => '<div class="container-inline">',
'#suffix' => '</div>',
);
$form['report']['type'] = array(
'#value' => $type,
'#type' => 'hidden',
);
$form['report']['url'] = array(
'#value' => $url,
'#type' => 'hidden',
);
$form['report']['start'] = array(
'#type' => 'textfield',
'#title' => t('Start'),
'#size' => 24,
'#maxlength' => 64,
'#default_value' => _ad_report_format_date_human($start),
// display pop up calendar if jstools jscalendar module enabled
'#attributes' => array(
'class' => 'jscalendar',
),
'#jscalendar_ifFormat' => '%Y-%m-%d %H:%M',
'#jscalendar_timeFormat' => '24',
);
$form['report']['space1'] = array(
'#value' => ' ',
);
$form['report']['end'] = array(
'#type' => 'textfield',
'#title' => t('End'),
'#size' => 24,
'#maxlength' => 64,
'#default_value' => _ad_report_format_date_human($end),
// display pop up calendar if jstools jscalendar module enabled
'#attributes' => array(
'class' => 'jscalendar',
),
'#jscalendar_ifFormat' => '%Y-%m-%d %H:%M',
);
$form['report']['space2'] = array(
'#value' => ' ',
);
$form['report']['generate'] = array(
'#type' => 'submit',
'#value' => t('Generate report'),
);
return $form;
}