Example #1
0
File: Help.php Project: hybr/jpm
 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();
 }
Example #2
0
File: Label.php Project: hybr/jpm
 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();
 }
Example #3
0
 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');
 }
Example #4
0
 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');
 }
Example #5
0
 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');
 }
Example #6
0
File: Select.php Project: hybr/jpm
 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');
 }
Example #7
0
 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');
 }
Example #8
0
File: Input.php Project: hybr/jpm
 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'));
 }