Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 8, 2020. It is now read-only.

Fix/form label options#5226

Merged
weierophinney merged 3 commits into
zendframework:developfrom
dpommeranz:fix/form-label-options
Oct 23, 2013
Merged

Fix/form label options#5226
weierophinney merged 3 commits into
zendframework:developfrom
dpommeranz:fix/form-label-options

Conversation

@dpommeranz
Copy link
Copy Markdown
Contributor

The recently added label option "disable_html_escape" (#4677) should also work for multi option elements.

@texdc
Copy link
Copy Markdown
Contributor

texdc commented Oct 5, 2013

Good catch! Can you provide a test?

@froschdesign
Copy link
Copy Markdown
Member

public function testDisableEscapeHtmlHelper()
{
    $element = new MultiCheckboxElement('foo');
    $element->setLabelOptions(
        array(
             'disable_html_escape' => true,
        )
    );
    $element->setValueOptions(
        array(
             array(
                 'label' => '<span>label1</span>',
                 'value' => 'value1',
             ),
        )
    );

    $this->assertEquals(
        '<label><input type="checkbox" name="foo[]" value="value1"><span>label1</span></label>',
        $this->helper->render($element)
    );
}

@dpommeranz
Copy link
Copy Markdown
Contributor Author

test added. thanks @froschdesign

weierophinney added a commit that referenced this pull request Oct 23, 2013
weierophinney added a commit that referenced this pull request Oct 23, 2013
@weierophinney weierophinney merged commit 1384674 into zendframework:develop Oct 23, 2013
@ghost ghost assigned weierophinney Oct 23, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants