public function input($type, $name, $value = null, array $attributes = array()) { if ($type === 'submit') { $attributes['class'] = 'button'; } return Html::input($type, $name, $value, $attributes); }
public function testRowWithValue() { $token = '12345'; $this->row->setValue($token); $expected = Html::input('hidden', 'token', $token); $this->assertSame($expected, $this->row->render($this->renderer)); }
public function input($type, $name, $value = null, array $attributes = array()) { if ($type === 'submit') { //check for a btn (or button-type for compat with others?) //attribute, apply if it's set (primary, success, danger) //and unset from attributes $attributes = Html::addToAttributeArray($attributes, 'class', 'btn btn-primary'); } else { $attributes = Html::addToAttributeArray($attributes, 'class', 'form-control'); } return Html::input($type, $name, $value, $attributes); }
public function testTextareaContentIsEscaped() { $expected = '<textarea id="foo" name="foo"></textarea><p>Gotcha!</p></textarea>'; $this->assertSame($expected, Html::input('textarea', 'foo', '</textarea><p>Gotcha!</p>')); }
public function input(RendererInterface $renderer) { return Html::input('hidden', $this->name, $this->value, $this->attributes); }
public function input($type, $name, $value = null, array $attributes = array()) { return Html::input($type, $name, $value, $attributes); }
public function input(RendererInterface $renderer) { $attributes = $this->visible ? $this->attributes : array_merge(array('style' => 'display: none;'), $this->attributes); return Html::input('text', $this->name, $this->value, $attributes); }