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()); }
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(); }
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; }
/** * @return Psc\HTML\HTMLInterface */ public function getInnerHTML() { $input = $this->getComboBox()->html(); \Psc\UI\Form::attachLabel($input, $this->getFormLabel()); return $input; }
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; }
/** * * $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); }
public function getInnerHTML() { return f::text($this->getFormLabel(), $this->getFormName(), $this->toFormValue()); }
public function getInnerHTML() { return f::checkbox($this->getFormLabel(), $this->getFormName(), $this->getFormValue()); }
public function disable() { parent::disable(); $this->hint = Form::hint($this->deleteHint)->templatePrepend('<br />'); $this->after($this->hint); }
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; }
public function getInnerHTML() { return f::radios($this->getFormLabel(), $this->getFormName(), $this->getValues(), $this->getFormValue()); }
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; }
public function getAutoCompleteWidget($value = '') { // @TODO schöner wäre eine componente $input = f::text(NULL, 'identifier', $value)->addClass('autocomplete')->removeAttribute('id'); return $input; }