1: <?php
2: namespace Sphp\Comp\Form;
3:
4: /**
5: * Description of label
6: * use bootstrap grid
7: * @author sartaj
8: */
9: class Label extends \Sphp\tools\Component{
10: static $size = array('col-md-4 col-xs-12','col-md-8 col-xs-12');
11:
12: public function fu_setLabel($param) {
13: $param = str_replace('*', '<span class="text-danger">*</span>', $param);
14: $this->element->appendPreTag('<div class="control-group">
15: <div class="row mb-3"><div class="'. self::$size[0] .' text-md-end text-xs-start my-auto">
16: <label class="form-label" for="'. $this->HTMLID .'">&nbsp;'. $param.':-</label>
17: </div><div class="'. self::$size[1] .'"><div class="controls">');
18: $this->element->appendPostTag('</div>
19: </div></div>
20: </div>');
21: }
22: public function fu_setSize($label,$comp) {
23: Label::$size[0] = $label;
24: Label::$size[1] = $comp;
25: }
26: }
27: