Example #1
0
 protected function doInit()
 {
     list($buttons, $this->buttonSnippets) = $this->convertButtons();
     $this->html = HTML::tag('div', $buttons, array('class' => '\\Psc\\drop-box'));
     if (isset($this->label)) {
         \Psc\UI\Form::attachLabel($this->html, $this->label);
     }
     $this->autoLoadJoose($this->getJooseSnippet());
 }
Example #2
0
 public function testWTFBug()
 {
     $content = NULL;
     $divcontent = \Psc\UI\Form::group('Sounds', $content, \Psc\UI\Form::GROUP_COLLAPSIBLE);
     $tagggggg = \Psc\HTML\HTML::tag('div', $divcontent);
     //$tagggggg->debug = TRUE;
     $tagggggg->chain(new \Psc\JS\Code("pling"));
     ob_start();
     print $tagggggg->html();
     ob_end_clean();
 }
Example #3
0
 public function wrapHTML($componentContent)
 {
     $forClass = 'component-for-' . implode('-', (array) $this->getFormName());
     $wrapper = HTML::tag('div', new stdClass(), array('class' => array('component-wrapper', 'input-set-wrapper', $forClass)));
     $wrapper->content->component = $componentContent;
     $wrapper->content->hint = $this->hasHint() ? f::hint($this->hint) : NULL;
     $wrapper->content->break = $this->hasHint() && !$this->isBlock($componentContent) ? '<br />' : NULL;
     $wrapper->content->js = NULL;
     $wrapper->setContentTemplate("%component%\n%js%%break%\n%hint%");
     return $wrapper;
 }
Example #4
0
 /**
  * @return Psc\HTML\HTMLInterface
  */
 public function getInnerHTML()
 {
     $input = $this->getComboBox()->html();
     \Psc\UI\Form::attachLabel($input, $this->getFormLabel());
     return $input;
 }
Example #5
0
 protected function getFormDocumentation()
 {
     $html = \Psc\UI\Group::create($this->trans('component.navigation.doc.levels', array(), 'cms'), array(Form::hint($this->trans('component.navigation.doc.reading', array(), 'cms')) . '<br />', '<br />'))->setStyle('margin-top', '7px');
     $html .= \Psc\UI\Group::create($this->trans('component.navigation.doc.newPage', array(), 'cms'), array(Form::hint($this->trans('component.navigation.doc.addNode', array(), 'cms'))));
     return $html;
 }
Example #6
0
 /**
 * 
 * $content .= f::inputSet(
    f::input(
      $form->createTypeSelect('\SerienLoader\Status',$episode->getStatus())
    )
 */
 public function createTypeSelect($typeClass, $selected, $label = NULL, $field = NULL)
 {
     $type = $typeClass::instance();
     $values = $type->getValues();
     $options = array_combine($values, array_map('ucfirst', $values));
     if (!isset($field)) {
         $field = lcfirst(Code::getClassName($typeClass));
         // sowas wie \tiptoi\SpeakerType => speakerType
     }
     if (!isset($label)) {
         $label = ucfirst($field);
     }
     return f::select($label, lcfirst($field), $options, $selected);
 }
Example #7
0
 public function getInnerHTML()
 {
     return f::text($this->getFormLabel(), $this->getFormName(), $this->toFormValue());
 }
Example #8
0
 public function getInnerHTML()
 {
     return f::checkbox($this->getFormLabel(), $this->getFormName(), $this->getFormValue());
 }
Example #9
0
 public function disable()
 {
     parent::disable();
     $this->hint = Form::hint($this->deleteHint)->templatePrepend('<br />');
     $this->after($this->hint);
 }
Example #10
0
 public function getInnerHTML()
 {
     $ta = fHTML::textarea($this->getFormName(), $this->getFormValue(), array('class' => array('textarea', 'ui-widget-content', 'ui-corner-all')))->setAttribute('cols', 102)->setAttribute('rows', 6)->setStyle('width', '90%');
     f::attachLabel($ta, $this->getFormLabel());
     return $ta;
 }
Example #11
0
 public function getInnerHTML()
 {
     return f::radios($this->getFormLabel(), $this->getFormName(), $this->getValues(), $this->getFormValue());
 }
Example #12
0
 public function getInnerHTML()
 {
     $select = fHTML::select($this->getFormName(), $this->getValuesWithLabel(), $this->getFormValue(), array('class' => array('text', 'ui-widget-content', 'ui-corner-all')));
     \Psc\UI\Form::attachLabel($select, $this->getFormLabel());
     return $select;
 }
Example #13
0
 public function getAutoCompleteWidget($value = '')
 {
     // @TODO schöner wäre eine componente
     $input = f::text(NULL, 'identifier', $value)->addClass('autocomplete')->removeAttribute('id');
     return $input;
 }