static public showDateFormItem ( $element, $value = '', $maybeempty = true, $can_edit = true, $minDate = '', $maxDate = '', $displayYear = true ) : rand | ||
$element | name of the element | |
$value | default value to display (default '') | |
$maybeempty | may be empty ? (true by default) | |
$can_edit | could not modify element (true by default) | |
$minDate | minimum allowed date (default '') | |
$maxDate | maximum allowed date (default '') | |
$displayYear | should we set/diplay the year? (true by default) | |
return | rand | value used \deprecated since 0.84 used Html::showDateField instead |
static function showDateFormItem($element, $value = '', $maybeempty = true, $can_edit = true, $minDate = '', $maxDate = '', $displayYear = true)
{
return self::showDateField($element, array('value' => $value, 'maybeempty' => $maybeempty, 'canedit' => $can_edit, 'min' => $minDate, 'max' => $maxDate, 'showyear' => $displayYear));
}
/** * Show a date selector * @param datetime $date1 date of start * @param datetime $date2 date of ending * @param string $randname random string (to prevent conflict in js selection) * @return nothing */ static function showSelector($date1, $date2, $randname) { $request_string = self::getRequestString($_GET); echo "<div class='center'><form method='POST' action='?{$request_string}' name='form'" . " id='mreporting_date_selector'>\n"; echo "<table class='tab_cadre'><tr class='tab_bg_1'>"; echo '<td><table><tr class="tab_bg_1">'; echo "<td>"; Html::showDateFormItem("date1" . $randname, $date1, false); echo "</td>\n"; echo "<td>"; Html::showDateFormItem("date2" . $randname, $date2, false); echo "</td>\n"; self::getReportSelectors(); echo "</tr></table></td>"; echo "<td rowspan='2' class='center'>"; echo "<input type='submit' class='button' name='submit' Value=\"" . _sx('button', 'Post') . "\">"; echo "</td>\n"; echo "<td class='center'>"; $_SERVER['REQUEST_URI'] .= "&date1" . $randname . "=" . $date1; $_SERVER['REQUEST_URI'] .= "&date2" . $randname . "=" . $date2; Bookmark::showSaveButton(Bookmark::URI); echo "</td>\n"; echo "</tr>"; echo "</table>"; Html::closeForm(); echo "</div>\n"; }