Form fields clean-up

Added a FieldView interface which must be implemented by field
renderers. The form's main view will look for FieldView implementations
to determine how to render specific field types. The only exception are
hidden fields, which are handled separately.
This commit is contained in:
Emmanuel BENOîT 2012-02-07 09:25:10 +01:00
parent 47b759d993
commit cdb2e952f5
3 changed files with 153 additions and 76 deletions
includes/form

View file

@ -3,6 +3,7 @@
$package[ 'requires' ][] = 'box';
$package[ 'files' ][] = 'field';
$package[ 'files' ][] = 'field_views';
$package[ 'files' ][] = 'form';
$package[ 'files' ][] = 'view';
$package[ 'files' ][] = 'ctrl';
@ -15,11 +16,20 @@ $package[ 'ctrls' ][] = 'form';
$package[ 'extras' ][] = 'Field';
$package[ 'extras' ][] = 'FieldModifier';
$package[ 'extras' ][] = 'FieldValidator';
$package[ 'extras' ][] = 'FieldView';
$package[ 'extras' ][] = 'Form';
$package[ 'extras' ][] = 'FormAware';
$package[ 'extras' ][] = 'FieldView_Label';
$package[ 'extras' ][] = 'FieldView_Text';
$package[ 'extras' ][] = 'FieldView_Password';
$package[ 'extras' ][] = 'FieldView_TextArea';
$package[ 'extras' ][] = 'FieldView_Select';
$package[ 'extras' ][] = 'Modifier_TrimString';
$package[ 'extras' ][] = 'Validator_StringLength';
$package[ 'extras' ][] = 'Validator_InArray';
$package[ 'extras' ][] = 'Validator_IntValue';
$package[ 'extras' ][] = 'Validator_Email';