Example #1
0
File: Form.php Project: cmsx/form
 /** Отрисовка формы */
 public function render($attr = null)
 {
     return HTML::Form(sprintf($this->tmpl_fields, $this->renderFields(), $this->renderSubmit()), $this->getAction(), null, $this->getFormAttributes($attr));
 }
Example #2
0
File: html.php Project: cmsx/html
 function testForm()
 {
     $f = HTML::Form('<div></div>');
     $this->assertSelectCount('form[action=] div', true, $f);
     $this->assertSelectCount('form[enctype=multipart/form-data]', true, $f);
     $f = HTML::Form('<div></div>', '/hello/', null, 'myclass');
     $this->assertSelectCount('form[action=/hello/] div', true, $f);
     $this->assertSelectCount('form[class=myclass]', true, $f);
     $f = HTML::Form('<div></div>', '/hello/', 'wtf', array('id' => 'myform'));
     $this->assertSelectCount('form[action=/hello/] div', true, $f);
     $this->assertSelectCount('form[enctype=wtf] div', true, $f);
     $this->assertSelectCount('form[id=myform] div', true, $f);
 }