public function show() { if ($this->getOption('text') == '') { return ''; } $contentHtmlTag = new owebp_Html_Tag(array('tag' => 'span', 'id' => $this->getOption('fieldName'), 'content' => '<b>Help</b>: ' . $this->getOption('text'))); /* return with cover */ return (new owebp_Html_FormFieldComponentCover(array('position' => $this->getOption('position'), 'content' => $contentHtmlTag->get())))->get(); }
public function show() { $contentHtmlTag = new owebp_Html_Tag(array('tag' => 'span', 'content' => (new owebp_TitleCreator(array('string' => $this->getOption('title'))))->get())); $titleText = trim($contentHtmlTag->get()); if ($this->getOption('required') == 1) { $requiredHtmlTag = new owebp_Html_Tag(array('tag' => 'span', 'content' => ' *', 'style' => 'color: red;')); $titleText .= ' ' . $requiredHtmlTag->get(); } $labelHtmlTag = new owebp_Html_Tag(array('tag' => 'label', 'class' => 'ui-widget-header', 'id' => $this->getOption('name'), 'style' => 'padding: 2px;', 'content' => trim($titleText))); /* return with cover */ return (new owebp_Html_FormFieldComponentCover(array('position' => $this->getOption('position'), 'content' => $labelHtmlTag->get())))->get(); }
function __construct($opts = array()) { /* define options and their defaults */ /* update options with input */ parent::__construct($opts); /* these options can not be changed */ $this->setOptionDefault('tag', 'div'); $this->setOptionDefault('class', 'jpm-html-form-field-cover'); }
function __construct($opts = array()) { /* define options and their defaults */ $this->setOptionDefault('value', ''); $this->setOptionDefault('selected', ''); /* update options with input */ parent::__construct($opts); /* these options can not be changed */ $this->setOptionDefault('tag', 'option'); $this->setOptionDefault('class', 'jpm-html-select-option ui-menu-item'); }
function __construct($opts = array()) { /* define options and their defaults */ $this->setOptionDefault('rows', 3); $this->setOptionDefault('cols', 30); $this->setOptionDefault('position', ''); $this->setOptionDefault('required', ''); /* update options with input */ parent::__construct($opts); /* these options can nt be changed */ $this->setOptionDefault('tag', 'textarea'); }
function __construct($opts = array()) { /* define options and their defaults */ $this->setOptionDefault('size', ''); $this->setOptionDefault('multiple', ''); $this->setOptionDefault('selected', ''); $this->setOptionDefault('position', ''); $this->setOptionDefault('required', ''); /* update options with input */ parent::__construct($opts); /* these options can nt be changed */ $this->setOptionDefault('tag', 'select'); $this->setOptionDefault('class', 'jpm-html-select ui-menu ui-widget ui-state-default ui-state-hover ui-state-focus'); }
function __construct($opts = array()) { /* define options and their defaults */ $this->setOptionDefault('position', ''); /* update options with input */ parent::__construct($opts); /* these options can nt be changed */ $coverHtmlTagName = 'span'; /* values include top, bottom, left, right */ if ($this->getOption('position') == 'bottom' || $this->getOption('position') == 'top') { $coverHtmlTagName = 'div'; } $this->setOptionDefault('tag', $coverHtmlTagName); $this->setOptionDefault('class', 'jpm-html-form-field-component-cover'); }
function __construct($opts = array()) { /* define options and their defaults */ $this->setOptionDefault('size', 33); $this->setOptionDefault('position', ''); $this->setOptionDefault('checked', ''); $this->setOptionDefault('required', ''); $this->setOptionDefault('jpm_foreign_collection', ''); $this->setOptionDefault('jpm_foreign_search_fields', ''); $this->setOptionDefault('jpm_foreign_title_fields', ''); /* update options with input */ parent::__construct($opts); /* these options can nt be changed */ $this->setOptionDefault('tag', 'input'); $this->setOptionDefault('type', 'text'); $this->setOptionDefault('value', $this->getOption('content')); }