Details
-
Type:
Sub-task
-
Status:
In Progress
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Zend_Form
-
Labels:None
Description
The docs for this decorator state:
"You may optionally specify a 'tag' option; if provided, it wraps the label in that block-level tag. If the 'tag' option is present, and no label present, the tag is rendered with no content. You can specify the class to use with the tag with the 'class' option or by calling setClass(). "
However, passing the 'class' option or calling setClass actually sets the class for the label, not the tag which wraps it, severely limiting the utility of the tag option.
Suggested fix: add a 'tagClass' option.
Fix: added tagOptions option to Zend_Form_Decorator_Label. These options are then passed to the HtmlTag decorator which wraps the label tag. These options do not overwrite the tag or id options specified in Zend_Form_Decorator_Label::render
Also attached is a test for this change.
This is my first patch / test so any feedback welcome.