Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344568 )

Change subject: Added label tags for input labels in Special:CreateForm
......................................................................

Added label tags for input labels in Special:CreateForm

Change-Id: I81662f62e463071557a551adb23bf238b59766e6
---
M specials/PF_CreateForm.php
1 file changed, 12 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms 
refs/changes/68/344568/2

diff --git a/specials/PF_CreateForm.php b/specials/PF_CreateForm.php
index 6cc4c5a..187ffcd 100644
--- a/specials/PF_CreateForm.php
+++ b/specials/PF_CreateForm.php
@@ -295,13 +295,13 @@
                $text .= $this->formCreationHTML( $form );
 
                $text .= "<h2> " . wfMessage( 'pf_createform_addelements' 
)->escaped() . " </h2>";
-               $text .= "\t<p>" . wfMessage( 'pf_createform_addtemplate' 
)->escaped() . "\n";
+               $text .= "\t<p><label>" . wfMessage( 
'pf_createform_addtemplate' )->escaped() . "\n";
 
                $select_body = "";
                foreach ( $all_templates as $template ) {
                        $select_body .= "       " . Html::element( 'option', 
array( 'value' => $template ), $template ) . "\n";
                }
-               $text .= "\t" . Html::rawElement( 'select', array( 'name' => 
'new_template' ), $select_body ) . "\n";
+               $text .= "\t" . Html::rawElement( 'select', array( 'name' => 
'new_template' ), $select_body ) . "\n</label>\n";
 
                // If a template has already been added, show a dropdown letting
                // the user choose where in the list to add a new dropdown.
@@ -321,8 +321,9 @@
 
                // Selection for before which item this template should be 
placed
                if ( count( $form_items ) > 0 ) {
-                       $text .= wfMessage( 'pf_createform_before' )->escaped();
-                       $text .= Html::rawElement( 'select', array( 'name' => 
'before_template' ), $select_body ) . "\n";
+                       $text .= '<label>' . wfMessage( 'pf_createform_before' 
)->escaped() .
+                               Html::rawElement( 'select', array( 'name' => 
'before_template' ), $select_body ) .
+                               "\n</label>\n";
                }
 
                // Disable 'save' and 'preview' buttons if user has not yet
@@ -512,8 +513,8 @@
                $input_type_text = wfMessage( 'pf_createform_inputtype' 
)->escaped();
                $text .= <<<END
        <div class="formField">
-       <p>$form_label_text $form_label_input
-       &#160; $input_type_text
+       <p><label>$form_label_text $form_label_input</label>
+       &#160; <label>$input_type_text
 
 END;
                global $wgPageFormsFormPrinter;
@@ -533,7 +534,7 @@
                        $default_input_type = null;
                        $possible_input_types = 
$wgPageFormsFormPrinter->getAllInputTypes();
                }
-               $text .= $this->inputTypeDropdownHTML( $field_form_text, 
$default_input_type, $possible_input_types, $field->getInputType() );
+               $text .= $this->inputTypeDropdownHTML( $field_form_text, 
$default_input_type, $possible_input_types, $field->getInputType() ) . 
"</label>\n";
 
                if ( !is_null( $field->getInputType() ) ) {
                        $cur_input_type = $field->getInputType();
@@ -695,10 +696,10 @@
                                $text .= "<div style=\"background: 
$bgcolor;\">";
                        }
 
-                       $text .= "<div style=\"width: 30%; padding: 5px; float: 
left;\">$paramName:\n";
+                       $text .= "<div style=\"width: 30%; padding: 5px; float: 
left;\">\n<label>$paramName:\n";
 
                        $text .= self::inputTypeParamInput( $type, $paramName, 
$cur_value, $param, array(), $fieldFormText );
-                       $text .= "\n<br />" . Html::rawElement( 'em', null, 
$desc ) . "\n</div>\n";
+                       $text .= "\n</label>\n<br />" . Html::rawElement( 'em', 
null, $desc ) . "\n</div>\n";
 
                        if ( $i % 3 == 2 || $i == count( $params ) - 1 ) {
                                $text .= "<div style=\"clear: 
both;\"></div></div>\n";
@@ -740,10 +741,10 @@
                                $text .= "<div style=\"background: 
$bgcolor;\">";
                        }
 
-                       $text .= "<div style=\"width: 30%; padding: 5px; float: 
left;\">$paramName:\n";
+                       $text .= "<div style=\"width: 30%; padding: 5px; float: 
left;\">\n<label>$paramName:\n";
 
                        $text .= self::inputTypeParamInput( $type, $paramName, 
$cur_value, $param, array(), $section_text );
-                       $text .= "\n<br />" . Html::rawElement( 'em', null, 
$desc ) . "\n</div>\n";
+                       $text .= "\n</label>\n<br />" . Html::rawElement( 'em', 
null, $desc ) . "\n</div>\n";
                        if ( $i % 3 == 2 || $i == count( $params ) - 1 ) {
                                $text .= "<div style=\"clear: 
both\";></div></div>\n";
                        }

-- 
To view, visit https://gerrit.wikimedia.org/r/344568
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I81662f62e463071557a551adb23bf238b59766e6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <yaro...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to