r89341 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89340‎ | r89341 | r89342 >
Date:15:00, 2 June 2011
Author:yaron
Status:deferred
Tags:
Comment:
Replaced more hardcoded HTML in 'CreateForm' form with calls to Xml class
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormField.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormField.php
@@ -152,11 +152,17 @@
153153 }
154154 // If it's not a semantic field - don't add any text.
155155 $form_label_text = wfMsg( 'sf_createform_formlabel' );
156 - $field_label = $template_field->label;
 156+ $form_label_input = Xml::element( 'input',
 157+ array(
 158+ 'type' => 'text',
 159+ 'name' => 'label_' . $field_form_text,
 160+ 'size' => 20,
 161+ 'value' => $template_field->label,
 162+ ), null );
157163 $input_type_text = wfMsg( 'sf_createform_inputtype' );
158164 $text .= <<<END
159165 <div class="formField">
160 - <p>$form_label_text <input type="text" name="label_$field_form_text" size=20 value="$field_label" />
 166+ <p>$form_label_text $form_label_input
161167 &#160; $input_type_text
162168
163169 END;