Some further refactoring in form classes.
[timetracker.git] / WEB-INF / lib / form / Calendar.class.php
index 4257d26..dbe2998 100644 (file)
@@ -45,7 +45,7 @@ class Calendar extends FormElement {
     var $controlName = "";
     var $highlight = "time"; // Determines what type of active days to highlight ("time" or "expenses"). 
     // var $mAllDays       = true;
-    var $cClassName    = "Calendar";
+    var $class = "Calendar";
 
     function __construct($name) {
         $this->controlName = $name;
@@ -58,11 +58,10 @@ class Calendar extends FormElement {
          $this->highlight = $highlight;
     }
 
-    function setLocalization($i18n) {
+    function localize($i18n) {
       global $user;
       
-      FormElement::setLocalization($i18n);
-      $this->mMonthNames    = $i18n->monthNames;
+      $this->mMonthNames = $i18n->monthNames;
       $this->mWeekDayShortNames = $i18n->weekdayShortNames;
       if (is_array($i18n->holidays)) {
         foreach ($i18n->holidays as $fday) {
@@ -223,7 +222,7 @@ class Calendar extends FormElement {
       return $str;
     }
 
-    function toStringControl() {
+    function getHtml() {
         return $this->toString();
     }