Page MenuHomePhabricator

HTMLForm section name lookup keys are prefixed with the form/action name
Open, LowPublic

Description

Author: dee

Description:
When using HTMLForm (via FormAction), the section name keys are prefixed with the action/form name.
This on its own is fine, but no other keys are prefixed in this way.

protected function getFormFields() {
        // Return the fields
        return array(
                'fieldname' => array(
                        'type' => 'text',
                        'section' => 'sectionname',
                        'label-message' => 'labelname',
                        'default' => '1234',
                ),
        );
}

This renders as -- <actionname-sectionname> --

As it stands, this means my i18n file needs to contain:

"actionname-sectionname" => "Section name",
"labelname" => "Label caption",

[http://www.mediawiki.org/w/index.php?title=HTMLForm/tutorial2&diff=580345&oldid=580344 this change] sugests that it has been corrected at some point, or that it's regressed.

This was seen with 1.21.5 and 1.22.2.

Looking at [http://www.mediawiki.org/wiki/HTMLForm/tutorial2#Adding_sections this page]


Version: 1.22.2
Severity: minor

Details

Reference
bz62046

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:03 AM
bzimport set Reference to bz62046.
bzimport added a subscriber: Unknown Object (MLST).

dee wrote:

Erm, ignore the last line and sorry about the wiki link.