Form class tests and updates
Still rockin' that XHTML4 nonsense. Updates to HTML5 (sans self closing tags) and added tests.
This commit is contained in:
parent
13e9507b49
commit
f0b5bfa459
3 changed files with 180 additions and 15 deletions
|
@ -79,7 +79,7 @@ class Form extends Object
|
|||
$additional .= ' class="' . $classes . '"';
|
||||
}
|
||||
|
||||
return '<input type="' . $type . '" name="' . $name . '" id="' . $name . '"' . $additional . ' />';
|
||||
return '<input type="' . $type . '" name="' . $name . '" id="' . $name . '"' . $additional . '>';
|
||||
}
|
||||
|
||||
// }}}
|
||||
|
@ -250,11 +250,6 @@ class Form extends Object
|
|||
return $this->input($name, $value, $classes, $additional, 'checkbox', $checked);
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ Checkboxes
|
||||
|
||||
// @todo
|
||||
|
||||
// }}}
|
||||
// {{{ Radio Button
|
||||
|
||||
|
@ -276,12 +271,7 @@ class Form extends Object
|
|||
}
|
||||
|
||||
// }}}
|
||||
// {{{ Radio Buttons
|
||||
|
||||
// @todo
|
||||
|
||||
// }}}
|
||||
// {{{ Text Area
|
||||
// {{{ Textarea
|
||||
|
||||
/**
|
||||
* Textarea
|
||||
|
@ -567,7 +557,7 @@ class Form extends Object
|
|||
{
|
||||
$options = $part . '_options';
|
||||
$selected = 'selected_' . $part;
|
||||
$html .= ' ' . $this->select($name . '[' . $part . ']', $$options, $$selected, $classes, $additional);
|
||||
$html .= ($html == '' ? '' : ' ') . $this->select($name . '[' . $part . ']', $$options, $$selected, $classes, $additional);
|
||||
}
|
||||
|
||||
return $html;
|
||||
|
@ -670,7 +660,7 @@ class Form extends Object
|
|||
foreach ($parts as $part => $size)
|
||||
{
|
||||
$html .= ($html != '' ? ' ' : '');
|
||||
$html .= '<input type="input" name="' . $name . '[' . $part . ']" id="' . $name . '[' . $part . ']" value="' . $value[$part] . '" minlength="' . $size . '" maxlength="' . $size . '"' . $additional . ' />';
|
||||
$html .= '<input type="input" name="' . $name . '[' . $part . ']" id="' . $name . '[' . $part . ']" value="' . $value[$part] . '" minlength="' . $size . '" maxlength="' . $size . '"' . $additional . '>';
|
||||
}
|
||||
|
||||
return $html;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
Cache
|
||||
Config
|
||||
Database
|
||||
Form
|
||||
HTML
|
||||
Model
|
||||
Module
|
||||
|
|
176
tests/classes/FormTest.php
Normal file
176
tests/classes/FormTest.php
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue