From dbf72b83cd5376f13e4ecceb4a59871c8ffdc9d7 Mon Sep 17 00:00:00 2001 From: Romain Louis Date: Fri, 2 Nov 2007 03:20:05 +0000 Subject: [PATCH] Static function to be use as well from PopupDateTimeField and put it in a
  • tag git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44171 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- forms/CalendarDateField.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/forms/CalendarDateField.php b/forms/CalendarDateField.php index e986e41d4..7807e4d35 100755 --- a/forms/CalendarDateField.php +++ b/forms/CalendarDateField.php @@ -6,6 +6,14 @@ class CalendarDateField extends DateField { protected $futureOnly; + static function HTMLField( $id, $name, $val ) { + return << + +
    +HTML; + } + function Field() { Requirements::javascript("jsparty/calendar/calendar.js"); Requirements::javascript("jsparty/calendar/lang/calendar-en.js"); @@ -20,11 +28,11 @@ class CalendarDateField extends DateField { $futureClass = $this->futureOnly ? ' futureonly' : ''; + $innerHTML = self::HTMLField( $id, $this->name, $val ); + return << - - -
    + $innerHTML HTML; }