public function __construct($name, $title = '') { parent::__construct('text', $name, $title); $this->settings['size'] = 10; $this->settings['value'] = ''; $this->settings['readonly'] = False; }
public function getAttributes() { $this->value && ($this->attributes->checked = 'checked'); parent::getAttributes(); $this->attributes->offsetUnset('value'); return $this->attributes; }
public function render() { $this->prepareOptions(); $this->value = $this->label; $this->options->label = ''; $this->code = HTML::input($this->options); return parent::render(); }
/** * Prepare options * @return type */ public function prepareOptions() { $this->options->checked = $this->options->value ? 'checked' : ''; parent::prepareOptions(); $this->options->text = $this->options->label; $this->options->label = NULL; return $this->options; }
public function render() { $this->getAttributes(); $this->attributes->value = $this->label; $this->attributes->label = ''; $this->code = HTML::input($this->attributes); return parent::render(); }
/** * Конструктор * * @param type $options */ public function __construct($options) { $options['template'] = 'Form/templates/group'; parent::__construct($options); foreach ($this->options->elements as $key => $element) { $element->render = FALSE; $this->options->form->add($key, $element); } }
/** * Render */ public function render() { $this->getAttributes(); if ($this->value && ($this->value = Url::link(Url::toUri(UPLOADS . $this->value, ROOT, FALSE)))) { $tpl = new Template('Form.file'); $tpl->assign($this->attributes); $tpl->value = $this->value; $this->code = $tpl->render(); } return parent::render(); }
/** * Render */ public function render() { $this->getAttributes(); $this->attributes->type = 'file'; $this->attributes->class = 'ajaxed image'; $tpl = new Template('Upload_Ajax.image'); $tpl->assign($this->attributes); if ($this->value && ($this->value = Url::link(Url::toUri(UPLOADS . $this->value, ROOT, FALSE)))) { $tpl->value = $this->value; $tpl->image = $this->image; } $this->code = $tpl->render(); return Form_Element_Abstract::render(); }
/** * Конструктор * * @param type $options */ public function __construct($options) { $options['template'] = 'Form/templates/link'; $options['wrapper'] = FALSE; parent::__construct($options); }
public function __construct($name, $title = '') { parent::__construct('checkbox', $name, $title); $this->settings['value'] = True; $this->settings['checked'] = False; }
/** * Render */ public function render() { $this->prepareOptions(); $this->code = HTML::paired_tag('span', $this->value); return parent::render(); }
/** * Конструктор * * @param type $options */ public function __construct($options) { $options['template'] = 'Form/templates/textarea'; parent::__construct($options); }
public function __construct($name) { parent::__construct('hidden', $name); $this->settings['value'] = ''; }
public function __construct($name, $title = '') { parent::__construct('select', $name, $title); $this->settings['selected'] = ''; $this->settings['size'] = 0; }
/** * Render */ public function render() { $this->getAttributes(); $this->code = HTML::paired_tag('span', $this->value); return parent::render(); }