/**
  * build selection for ending date
  *
  * @access protected
  * @param object tpl
  * @return
  */
 protected function buildUntilSelection($tpl)
 {
     if ($this->isUnlimitedRecurrenceAllowed()) {
         $tpl->setVariable('TXT_NO_ENDING', $this->lng->txt('cal_no_ending'));
     }
     $tpl->setVariable('TXT_UNTIL_CREATE', $this->lng->txt('cal_create'));
     $tpl->setVariable('TXT_APPOINTMENTS', $this->lng->txt('cal_appointments'));
     $tpl->setVariable('VAL_COUNT', $this->recurrence->getFrequenceUntilCount() ? $this->recurrence->getFrequenceUntilCount() : 2);
     if ($this->recurrence->getFrequenceUntilDate()) {
         $tpl->setVariable('UNTIL_END_CHECKED', 'checked="checked"');
     } elseif ($this->recurrence->getFrequenceUntilCount() or !$this->isUnlimitedRecurrenceAllowed()) {
         $tpl->setVariable('UNTIL_COUNT_CHECKED', 'checked="checked"');
     } else {
         $tpl->setVariable('UNTIL_NO_CHECKED', 'checked="checked"');
     }
     $tpl->setVariable('TXT_UNTIL_END', $this->lng->txt('cal_repeat_until'));
     $dt = new ilDateTimeInputGUI('', 'until_end');
     $dt->setDate($this->recurrence->getFrequenceUntilDate() ? $this->recurrence->getFrequenceUntilDate() : new ilDate(time(), IL_CAL_UNIX));
     $tpl->setVariable('UNTIL_END_DATE', $dt->getTableFilterHTML());
 }
 /**
  * build selection for ending date
  *
  * @access protected
  * @param object tpl
  * @return
  */
 protected function buildUntilSelection($tpl)
 {
     $tpl->setVariable('TXT_NO_ENDING', $this->lng->txt('cal_no_ending'));
     $tpl->setVariable('TXT_UNTIL_CREATE', $this->lng->txt('cal_create'));
     $tpl->setVariable('TXT_APPOINTMENTS', $this->lng->txt('cal_appointments'));
     if ($this->freq_end instanceof ilDate) {
         $tpl->setVariable('UNTIL_END_CHECKED', 'checked="checked"');
     } else {
         $tpl->setVariable('UNTIL_NO_CHECKED', 'checked="checked"');
     }
     $tpl->setVariable('TXT_UNTIL_END', $this->lng->txt('cal_repeat_until'));
     $dt = new ilDateTimeInputGUI('', 'until_end');
     $dt->setDate($this->freq_end instanceof ilDate ? $this->freq_end : new ilDate(time(), IL_CAL_UNIX));
     $tpl->setVariable('UNTIL_END_DATE', $dt->getTableFilterHTML());
 }