Index: trunk/phase3/includes/HTMLForm.php |
— | — | @@ -180,7 +180,7 @@ |
181 | 181 | } |
182 | 182 | |
183 | 183 | function wrapForm( $html ) { |
184 | | - return Xml::tags( |
| 184 | + return Html::rawElement( |
185 | 185 | 'form', |
186 | 186 | array( |
187 | 187 | 'action' => $this->getTitle()->getFullURL(), |
— | — | @@ -194,8 +194,8 @@ |
195 | 195 | global $wgUser; |
196 | 196 | $html = ''; |
197 | 197 | |
198 | | - $html .= Xml::hidden( 'wpEditToken', $wgUser->editToken() ) . "\n"; |
199 | | - $html .= Xml::hidden( 'title', $this->getTitle() ) . "\n"; |
| 198 | + $html .= Html::hidden( 'wpEditToken', $wgUser->editToken() ) . "\n"; |
| 199 | + $html .= Html::hidden( 'title', $this->getTitle() ) . "\n"; |
200 | 200 | |
201 | 201 | return $html; |
202 | 202 | } |
— | — | @@ -213,7 +213,7 @@ |
214 | 214 | $html .= Xml::submitButton( $this->getSubmitText(), $attribs ) . "\n"; |
215 | 215 | |
216 | 216 | if( $this->mShowReset ) { |
217 | | - $html .= Xml::element( |
| 217 | + $html .= Html::element( |
218 | 218 | 'input', |
219 | 219 | array( |
220 | 220 | 'type' => 'reset', |
— | — | @@ -236,7 +236,7 @@ |
237 | 237 | $errorstr = $errors; |
238 | 238 | } |
239 | 239 | |
240 | | - $errorstr = Xml::tags( 'div', array( 'class' => 'error' ), $errorstr ); |
| 240 | + $errorstr = Html::rawElement( 'div', array( 'class' => 'error' ), $errorstr ); |
241 | 241 | |
242 | 242 | global $wgOut; |
243 | 243 | $wgOut->addHTML( $errorstr ); |
— | — | @@ -251,14 +251,14 @@ |
252 | 252 | $msg = $error; |
253 | 253 | $error = array(); |
254 | 254 | } |
255 | | - $errorstr .= Xml::tags( |
| 255 | + $errorstr .= Html::rawElement( |
256 | 256 | 'li', |
257 | 257 | null, |
258 | 258 | wfMsgExt( $msg, array( 'parseinline' ), $error ) |
259 | 259 | ); |
260 | 260 | } |
261 | 261 | |
262 | | - $errorstr = Xml::tags( 'ul', null, $errorstr ); |
| 262 | + $errorstr = Html::rawElement( 'ul', array(), $errorstr ); |
263 | 263 | |
264 | 264 | return $errorstr; |
265 | 265 | } |
— | — | @@ -450,20 +450,20 @@ |
451 | 451 | if ( $errors === true || !$wgRequest->wasPosted() ) { |
452 | 452 | $errors = ''; |
453 | 453 | } else { |
454 | | - $errors = Xml::tags( 'span', array( 'class' => 'error' ), $errors ); |
| 454 | + $errors = Html::rawElement( 'span', array( 'class' => 'error' ), $errors ); |
455 | 455 | } |
456 | 456 | |
457 | 457 | $html = ''; |
458 | 458 | |
459 | | - $html .= Xml::tags( 'td', array( 'class' => 'mw-label' ), |
460 | | - Xml::tags( 'label', array( 'for' => $this->mID ), $this->getLabel() ) |
| 459 | + $html .= Html::rawElement( 'td', array( 'class' => 'mw-label' ), |
| 460 | + Html::rawElement( 'label', array( 'for' => $this->mID ), $this->getLabel() ) |
461 | 461 | ); |
462 | | - $html .= Xml::tags( 'td', array( 'class' => 'mw-input' ), |
| 462 | + $html .= Html::rawElement( 'td', array( 'class' => 'mw-input' ), |
463 | 463 | $this->getInputHTML( $value ) ."\n$errors" ); |
464 | 464 | |
465 | 465 | $fieldType = get_class( $this ); |
466 | 466 | |
467 | | - $html = Xml::tags( 'tr', array( 'class' => "mw-htmlform-field-$fieldType" ), |
| 467 | + $html = Html::rawElement( 'tr', array( 'class' => "mw-htmlform-field-$fieldType" ), |
468 | 468 | $html ) . "\n"; |
469 | 469 | |
470 | 470 | $helptext = null; |
— | — | @@ -479,9 +479,9 @@ |
480 | 480 | } |
481 | 481 | |
482 | 482 | if ( !is_null( $helptext ) ) { |
483 | | - $row = Xml::tags( 'td', array( 'colspan' => 2, 'class' => 'htmlform-tip' ), |
| 483 | + $row = Html::rawElement( 'td', array( 'colspan' => 2, 'class' => 'htmlform-tip' ), |
484 | 484 | $helptext ); |
485 | | - $row = Xml::tags( 'tr', null, $row ); |
| 485 | + $row = Html::rawElement( 'tr', array(), $row ); |
486 | 486 | $html .= "$row\n"; |
487 | 487 | } |
488 | 488 | |
— | — | @@ -637,7 +637,7 @@ |
638 | 638 | } |
639 | 639 | |
640 | 640 | return Xml::check( $this->mName, $value, $attr ) . ' ' . |
641 | | - Xml::tags( 'label', array( 'for' => $this->mID ), $this->mLabel ); |
| 641 | + Html::rawElement( 'label', array( 'for' => $this->mID ), $this->mLabel ); |
642 | 642 | } |
643 | 643 | |
644 | 644 | function getLabel() { |
— | — | @@ -743,9 +743,9 @@ |
744 | 744 | $tbAttribs['maxlength'] = $this->mParams['maxlength']; |
745 | 745 | } |
746 | 746 | |
747 | | - $textbox = Xml::input( $this->mName . '-other', |
| 747 | + $textbox = Html::input( $this->mName . '-other', |
748 | 748 | $this->getSize(), |
749 | | - $valInSelect ? '' : $value, |
| 749 | + $valInSelect ? 'text' : $value, |
750 | 750 | $tbAttribs ); |
751 | 751 | |
752 | 752 | return "$select<br/>\n$textbox"; |
— | — | @@ -800,14 +800,14 @@ |
801 | 801 | |
802 | 802 | foreach( $options as $label => $info ) { |
803 | 803 | if( is_array( $info ) ) { |
804 | | - $html .= Xml::tags( 'h1', null, $label ) . "\n"; |
| 804 | + $html .= Html::rawElement( 'h1', array(), $label ) . "\n"; |
805 | 805 | $html .= $this->formatOptions( $info, $value ); |
806 | 806 | } else { |
807 | 807 | $thisAttribs = array( 'id' => $this->mID . "-$info", 'value' => $info ); |
808 | 808 | |
809 | 809 | $checkbox = Xml::check( $this->mName . '[]', in_array( $info, $value ), |
810 | 810 | $attribs + $thisAttribs ); |
811 | | - $checkbox .= ' ' . Xml::tags( 'label', array( 'for' => $this->mID . "-$info" ), $label ); |
| 811 | + $checkbox .= ' ' . Html::rawElement( 'label', array( 'for' => $this->mID . "-$info" ), $label ); |
812 | 812 | |
813 | 813 | $html .= $checkbox . '<br />'; |
814 | 814 | } |
— | — | @@ -871,14 +871,14 @@ |
872 | 872 | |
873 | 873 | foreach( $options as $label => $info ) { |
874 | 874 | if( is_array( $info ) ) { |
875 | | - $html .= Xml::tags( 'h1', null, $label ) . "\n"; |
| 875 | + $html .= Html::rawElement( 'h1', array(), $label ) . "\n"; |
876 | 876 | $html .= $this->formatOptions( $info, $value ); |
877 | 877 | } else { |
878 | 878 | $id = Sanitizer::escapeId( $this->mID . "-$info" ); |
879 | 879 | $html .= Xml::radio( $this->mName, $info, $info == $value, |
880 | 880 | $attribs + array( 'id' => $id ) ); |
881 | 881 | $html .= ' ' . |
882 | | - Xml::tags( 'label', array( 'for' => $id ), $label ); |
| 882 | + Html::rawElement( 'label', array( 'for' => $id ), $label ); |
883 | 883 | |
884 | 884 | $html .= "<br/>\n"; |
885 | 885 | } |