Exemple #1
0
 public function init()
 {
     parent::init();
     $this->allowedAttributes[] = 'type';
     $this->type = 'submit';
     $this->tag = 'button';
 }
Exemple #2
0
 public function preRender() : string
 {
     if (count($this->children) > 0) {
         foreach ($this->children as $child) {
             $child->setSelected($child->get('value') == $this->value);
         }
     }
     if (is_null($this->data) === false) {
         foreach ($this->data as $option) {
             $value = '';
             $label = '';
             if (isset($option['label']) === true) {
                 $value = $option['value'];
                 $label = $option['label'];
             } elseif (isset($option[1]) === true) {
                 $value = $option[0];
                 $label = $option[1];
             }
             settype($this->value, 'string');
             settype($value, 'string');
             $this->add($this->build('option', $value, $label, $this->value == $value));
         }
     }
     return parent::preRender();
 }
Exemple #3
0
 public function init()
 {
     parent::init();
     $this->addClass('tab-pane');
     $this->addClass('fade');
     $this->attributes['role'] = 'tabpanel';
 }
Exemple #4
0
 public function preChildren() : string
 {
     if (is_null($this->legend) === false) {
         $this->preChildrenHtml .= $this->legend->render();
     }
     return parent::preChildren();
 }
Exemple #5
0
 public function init()
 {
     $this->allowedAttributes[] = 'onsubmit';
     $this->allowedAttributes[] = 'enctype';
     $this->allowedAttributes[] = 'method';
     $this->allowedAttributes[] = 'target';
     parent::init();
 }
Exemple #6
0
 public function init()
 {
     parent::init();
     $this->addClass('btn-group');
     $this->addClass('pull-right');
     $this->attributes['role'] = 'group';
     $this->add(html::button(lucid::$app->i18n()->translate('button:cancel'), 'secondary', 'history.go(-1);'));
     $this->add(html::submit(lucid::$app->i18n()->translate('button:save')));
 }
Exemple #7
0
 public function init()
 {
     $this->allowedAttributes[] = 'cellpadding';
     $this->allowedAttributes[] = 'cellspacing';
     $this->allowedAttributes[] = 'border';
     $this->allowedAttributes[] = 'width';
     $this->allowedAttributes[] = 'sortable';
     parent::init();
 }
Exemple #8
0
 public function init()
 {
     $this->allowedAttributes[] = 'checked';
     $this->allowedAttributes[] = 'default';
     $this->allowedAttributes[] = 'disabled';
     $this->allowedAttributes[] = 'icon';
     $this->allowedAttributes[] = 'label';
     $this->allowedAttributes[] = 'radiogroup';
     $this->allowedAttributes[] = 'type';
     parent::init();
 }
Exemple #9
0
 public function init()
 {
     $this->allowedAttributes[] = 'form';
     $this->allowedAttributes[] = 'high';
     $this->allowedAttributes[] = 'low';
     $this->allowedAttributes[] = 'max';
     $this->allowedAttributes[] = 'min';
     $this->allowedAttributes[] = 'optimum';
     $this->allowedAttributes[] = 'value';
     parent::init();
 }
Exemple #10
0
 public function add($child) : \Lucid\Html\TagInterface
 {
     if (is_object($child) === false) {
         if (trim($child) != '') {
             parent::add($this->build('paragraph')->addClass('card-text')->add($child));
         }
     } else {
         if ($child->tag == 'blockquote') {
             $child->addClass('card-blockquote');
             parent::add($child);
         } else {
             if ($child->tag == 'h3' && $child->hasClass('card-title') === true || $child->tag == 'h4' && $child->hasClass('card-title') === true || $child->tag == 'h6' && $child->hasClass('card-subtitle') === true || $child->tag == 'a' && $child->hasClass('btn') === true || $child->tag == 'a' && $child->hasClass('card-link') === true || $child->tag == 'p' && $child->hasClass('card-text') === true || $child->tag == 'ul') {
                 parent::add($child);
             } else {
                 parent::add($child);
                 #parent::add($this->build('paragraph')->addClass('card-text')->add($child));
             }
         }
     }
     return $this;
 }
Exemple #11
0
 public function add($child) : \Lucid\Html\TagInterface
 {
     if (is_object($child) === true) {
         if ($child->tag == 'input' || $child->tag == 'select' || $child->tag == 'textarea') {
             parent::add($child);
         } elseif ($child->tag == 'button' || $child->tag == 'a' && $child->hasClass('btn') === true) {
             parent::add('<span class="input-group-btn">');
             parent::add($child);
             parent::add('</span>');
         } else {
             parent::add('<span class="input-group-addon">');
             parent::add($child);
             parent::add('</span>');
         }
     } else {
         parent::add('<span class="input-group-addon">');
         parent::add($child);
         parent::add('</span>');
     }
     return $this;
 }
Exemple #12
0
 public function init()
 {
     $this->allowedAttributes[] = 'align';
     parent::init();
 }
Exemple #13
0
 public function init()
 {
     parent::init();
     $this->tag = 'td';
     $this->parameters = ['label', 'data_name', 'width', 'sortable', 'renderer'];
 }
Exemple #14
0
 public function init()
 {
     $this->addClass('card-subtitle');
     $this->addClass('text-muted');
     parent::init();
 }
Exemple #15
0
 public function init()
 {
     parent::init();
     #$this->addClass('col');
 }
Exemple #16
0
 public function init()
 {
     $this->allowedAttributes[] = 'width';
     $this->allowedAttributes[] = 'span';
     parent::init();
 }
Exemple #17
0
 public function add($child) : \Lucid\Html\TagInterface
 {
     if (is_object($child) === false) {
         parent::add($child);
     } else {
         if ($child->tag == 'input' && $child->get('type') == 'checkbox') {
             $this->useCheckableLayout = true;
             $this->checkableLayoutClass = 'checkbox';
             parent::add($child);
         } else {
             if ($child->tag == 'input' && $child->get('type') == 'radio') {
                 $this->useCheckableLayout = true;
                 $this->checkableLayoutClass = 'radio';
                 parent::add($child);
             } else {
                 parent::add($child);
             }
         }
     }
     return $this;
 }
Exemple #18
0
 public function init()
 {
     $this->allowedAttributes[] = 'type';
     $this->allowedAttributes[] = 'name';
     parent::init();
 }
Exemple #19
0
 public function init()
 {
     $this->allowedAttributes[] = 'datetime';
     parent::init();
 }
Exemple #20
0
 public function init()
 {
     parent::init();
     $this->addClass('nav-item');
 }
Exemple #21
0
 public function init()
 {
     $this->addClass('text-muted');
     parent::init();
 }
Exemple #22
0
 public function init()
 {
     $this->addClass('tag');
     parent::init();
 }
Exemple #23
0
 public function init()
 {
     $this->addClass('card-header');
     parent::init();
 }
Exemple #24
0
 public function postRender()
 {
     $html = parent::postRender();
     $html .= $this->renderPanes();
     $html .= parent::postRender();
     return $html;
 }
Exemple #25
0
 public function init()
 {
     parent::init();
     $this->addClass('btn-group');
     $this->attributes['role'] = 'group';
 }
Exemple #26
0
 public function init()
 {
     $this->allowedAttributes[] = 'rowspan';
     $this->allowedAttributes[] = 'colspan';
     parent::init();
 }
Exemple #27
0
 public function add($child) : \Lucid\Html\TagInterface
 {
     if (is_object($child) === true) {
         if ($child->hasClass('card-header') === true || $child->hasClass('card-block') === true || $child->hasClass('card-footer') === true || $child->tag == 'ul' || $child->tag == 'img') {
             if ($child->tag == 'ul') {
                 $child->addClass('list-group')->addClass('list-group-flush');
             }
             return parent::add($child);
         } else {
             $block = $this->get('block');
             $block->add($child);
             return $this;
         }
     } else {
         $block = $this->get('block');
         $block->add($child);
         return $this;
     }
 }
Exemple #28
0
 public function init()
 {
     $this->addClass('card-title');
     parent::init();
 }
Exemple #29
0
 public function init()
 {
     $this->addClass('container');
     parent::init();
 }