From: Happy-melon Date: Sat, 12 Mar 2011 11:08:20 +0000 (+0000) Subject: Follow-up r83298: keep the two elements of the message separate in an array in HTMLSe... X-Git-Tag: 1.31.0-rc.0~31509 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=bbf16f8c3ab661427270580e1bea628cfd25fec8;p=lhc%2Fweb%2Fwiklou.git Follow-up r83298: keep the two elements of the message separate in an array in HTMLSelectAndOtherField::loadDataFromRequest(), fixes various bugs with validation, defaults, and normalisation. --- diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index fb78970e04..1010229a10 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -1533,8 +1533,7 @@ class HTMLSelectAndOtherField extends HTMLSelectField { } function getInputHTML( $value ) { - - $select = parent::getInputHTML( $value ); + $select = parent::getInputHTML( $value[1] ); $textAttribs = array( 'id' => $this->mID . '-other', @@ -1549,7 +1548,7 @@ class HTMLSelectAndOtherField extends HTMLSelectField { $textbox = Html::input( $this->mName . '-other', - '', + $value[2], 'text', $textAttribs ); @@ -1557,6 +1556,10 @@ class HTMLSelectAndOtherField extends HTMLSelectField { return "$select
\n$textbox"; } + /** + * @param $request WebRequest + * @return Array( ,