X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Finstaller%2FWebInstaller.php;h=8fb980791e787685465e103b6bd7a57943daf36c;hp=9d7e0514bb9b5a8db77b6f8e1267ee32f060ff22;hb=478a58f63101f2b47d18a618296b5e7970fa3f24;hpb=dd942172f81013f0866370b2acb1eee829de19d3 diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index 9d7e0514bb..8fb980791e 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -915,6 +915,7 @@ class WebInstaller extends Installer { * Parameters are: * var: The variable to be configured (required) * label: The message name for the label (required) + * labelAttribs:Additional attributes for the label element (optional) * attribs: Additional attributes for the input element (optional) * controlName: The name for the input element (optional) * value: The current value of the variable (optional) @@ -937,6 +938,9 @@ class WebInstaller extends Installer { if ( !isset( $params['help'] ) ) { $params['help'] = ""; } + if ( !isset( $params['labelAttribs'] ) ) { + $params['labelAttribs'] = []; + } if ( isset( $params['rawtext'] ) ) { $labelText = $params['rawtext']; } else { @@ -945,17 +949,19 @@ class WebInstaller extends Installer { return "
\n" . $params['help'] . - "\n" . + Html::rawElement( + 'label', + $params['labelAttribs'], + Xml::check( + $params['controlName'], + $params['value'], + $params['attribs'] + [ + 'id' => $params['controlName'], + 'tabindex' => $this->nextTabIndex(), + ] + ) . + $labelText . "\n" + ) . "
\n"; }