Esempio n. 1
0
 public function show()
 {
     $inputHtmlTag = new owebp_Html_Input(array('name' => $this->getOption('name'), 'id' => $this->getOption('name'), 'size' => $this->getOption('size'), 'required' => $this->getOption('required'), 'content' => $this->getOption('value')));
     $inputHtmlTag->setOption('type', 'password');
     /* return with cover */
     return (new owebp_Html_FormFieldComponentCover(array('position' => $this->getOption('position'), 'content' => $inputHtmlTag->get())))->get();
 }
Esempio n. 2
0
 public function show()
 {
     $dataClassName = $this->getOption('dataClassName');
     if ($dataClassName == '') {
         return 'data source mising';
     }
     $dataClassInstance = new $dataClassName();
     /* option are content  of select tag */
     $selectOptionsList = '';
     $currentValue = $this->getOption('value');
     foreach ($dataClassInstance->getTable() as $r) {
         $checked = '';
         if ($r['value'] == $currentValue) {
             $checked = 'checked';
         }
         $oneBox = '<label>';
         $input = new owebp_Html_Input(array('type' => 'checkbox', 'name' => $this->getOption('name') . '[]', 'content' => $r['value'], 'checked' => $checked));
         $input->setOption('type', 'checkbox');
         $oneBox .= $input->get();
         $oneBox .= $r['title'];
         $oneBox .= '</label>';
         $selectOptionsList .= $oneBox;
     }
     /* foreach ( $dataClassInstance->getTable () as $r ) */
     /* return with cover */
     return (new owebp_Html_FormFieldComponentCover(array('position' => $this->getOption('position'), 'content' => $selectOptionsList)))->get();
 }