예제 #1
0
 function preParse($compiler)
 {
     if ($this->_isStandartMode()) {
         $this->widget_include_file = 'limb/macro/src/tags/form/lmbMacroCheckableInputWidget.class.php';
         $this->widget_class_name = 'lmbMacroCheckableInputWidget';
     } else {
         $this->widget_include_file = 'limb/macro/src/tags/form/lmbMacroJSCheckboxWidget.class.php';
         $this->widget_class_name = 'lmbMacroJSCheckboxWidget';
     }
     parent::preParse($compiler);
     $this->set('type', 'checkbox');
 }
예제 #2
0
 function preParse($compiler)
 {
     if ($this->getBool('multiple')) {
         $this->widget_include_file = 'limb/macro/src/tags/form/lmbMacroMultipleSelectWidget.class.php';
         $this->widget_class_name = 'lmbMacroMultipleSelectWidget';
         if (!$this->has('name')) {
             if ($this->has('id')) {
                 $this->set('name', $this->get('id') . '[]');
             } else {
                 $this->raiseRequiredAttribute('name');
             }
         }
         if (!is_integer(strpos($this->get('name'), '[]'))) {
             $this->raise('Array brackets "[]" required in name attribute, e.g. name="foo[]"', array('name' => $this->get('name')));
         }
     } elseif (!isset($this->widget_include_file)) {
         $this->widget_include_file = 'limb/macro/src/tags/form/lmbMacroSingleSelectWidget.class.php';
         $this->widget_class_name = 'lmbMacroSingleSelectWidget';
     }
     // always has closing tag
     $this->has_closing_tag = true;
     parent::preParse($compiler);
 }
예제 #3
0
 function preParse($compiler)
 {
     parent::preParse($compiler);
     $this->set('type', 'text');
 }
예제 #4
0
 function preParse($compiler)
 {
     parent::preParse($compiler);
     // always has closing tag
     $this->has_closing_tag = true;
 }
예제 #5
0
 function preParse($compiler)
 {
     parent::preParse($compiler);
     $this->set('type', 'password');
 }
예제 #6
0
 function preParse($compiler)
 {
     parent::preParse($compiler);
     $this->set('type', 'checkbox');
 }
예제 #7
0
 protected function _generateAfterClosingTag($code)
 {
     parent::_generateAfterClosingTag($code);
     $widget = $this->getRuntimeVar();
     $code->writePHP("{$widget}->renderCalendar();\n");
 }