Ejemplo n.º 1
0
 public function __construct($name, $caption, $value = NULL)
 {
     $id = 'form_field_' . self::$count++;
     $this->create_label($id, $caption);
     $this->input = html_standalone::create('input');
     $this->input->id = $id;
     $this->input->value = $value;
     $this->input->name = $name;
 }
Ejemplo n.º 2
0
 public function __construct($link, $prefix = '', $pagesize = 50)
 {
     parent::__construct('table');
     $this->class = 'table table-striped';
     $this->prefix = $prefix;
     $this->pagesize = $pagesize;
     $this->link = $link instanceof html_link ? $link : new html_link($link);
     $this->page = intval($_GET[$this->prefix . 'page']);
     $this->link[$this->prefix . 'page'] = $this->page;
 }
Ejemplo n.º 3
0
 public function __construct($name, $caption, $value = null)
 {
     $id = 'form_field_' . self::$count++;
     $this->create_label($id, $caption);
     $input = $this->input[] = html_standalone::create('input');
     $input->value = $value;
     $input->type = 'hidden';
     $input->name = $name;
     $input = $this->input[] = html_standalone::create('input');
     $input->id = $id;
     $input->type = 'text';
     $input->class = 'datepicker';
     $input->value = $value ? date('d.m.Y', $value) : '';
 }
Ejemplo n.º 4
0
 public function __construct($name, $caption, $options, $value = NULL)
 {
     $this->label = html_tag::create('div')->append($caption);
     $this->label->class = 'form_label';
     $this->input = array();
     foreach ($options as $k => $v) {
         $id = 'form_field_' . self::$count++;
         $label = html_tag::create('label')->append($v);
         $label->for = $id;
         $input = html_standalone::create('input');
         $input->type = 'radio';
         $input->id = $id;
         $input->value = $k;
         $input->name = $name;
         if ($k == $value) {
             $input->checked = true;
         }
         $this->input[] = array($input, $label);
     }
 }
Ejemplo n.º 5
0
 /**
  * Converts the object into html string
  * @return string
  */
 function __toString()
 {
     return parent::__toString() . implode($this->children) . "</{$this->tagname}>";
 }
Ejemplo n.º 6
0
 public function linkbutton($value, $link, $class = 'btn')
 {
     $button = html_standalone::create('input')->attr('type', 'button')->attr('value', $value)->attr('class', $class);
     $this->buttons->append($button->attr('onclick', "location.href = '{$link}'"));
     return $button;
 }