r50488 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50487‎ | r50488 | r50489 >
Date:15:16, 11 May 2009
Author:jan
Status:deferred (Comments)
Tags:
Comment:
Change input from HTML to Xml class
Modified paths:
  • /trunk/extensions/Poll/Poll_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Poll/Poll_body.php
@@ -42,18 +42,18 @@
4343 $wgOut->addWikiMsg( 'poll-create-block-error' );
4444 }
4545 else {
46 - $wgOut->addHtml( '<form action="index.php?title=Special:Poll&action=submit" method="post">' );
47 - $wgOut->addHtml( '<table style="border: 0px;">' );
48 - $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-question' ).':</td><td><input type="text" name="poll_name"></td></tr>' );
49 - $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-alternative' ).' 1:</td><td><input type="text" name="poll_alternative_1"></td></tr>' );
50 - $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-alternative' ).' 2:</td><td><input type="text" name="poll_alternative_2"></td></tr>' );
51 - $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-alternative' ).' 3:</td><td><input type="text" name="poll_alternative_3"></td></tr>' );
52 - $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-alternative' ).' 4:</td><td><input type="text" name="poll_alternative_4"></td></tr>' );
53 - $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-alternative' ).' 5:</td><td><input type="text" name="poll_alternative_5"></td></tr>' );
54 - $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-alternative' ).' 6:</td><td><input type="text" name="poll_alternative_6"></td></tr>' );
55 - $wgOut->addHtml( '<tr><td><input type="submit" value="'.wfMsg( 'poll-submit' ).'"></td></tr>' );
56 - $wgOut->addHtml( '</table>' );
57 - $wgOut->addHtml( '</form>' );
 46+ $wgOut->addHtml( Xml::openElement( 'form', array('method'=> 'post', 'action' => 'index.php?title=Special:Poll&action=submit' ) ) );
 47+ $wgOut->addHtml( Xml::openElement( 'table', array('method'=> 'post') );
 48+ $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-question' ).':</td><td>'.Xml::input('poll_name').'</td></tr>' );
 49+ $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-alternative' ).' 1:</td><td>'.Xml::input('poll_alternative_1').'</td></tr>' );
 50+ $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-alternative' ).' 2:</td><td>'.Xml::input('poll_alternative_2').'</td></tr>' );
 51+ $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-alternative' ).' 3:</td><td>'.Xml::input('poll_alternative_3').'</td></tr>' );
 52+ $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-alternative' ).' 4:</td><td>'.Xml::input('poll_alternative_4').'</td></tr>' );
 53+ $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-alternative' ).' 5:</td><td>'.Xml::input('poll_alternative_5').'</td></tr>' );
 54+ $wgOut->addHtml( '<tr><td>'.wfMsg( 'poll-alternative' ).' 6:</td><td>'.Xml::input('poll_alternative_6').'</td></tr>' );
 55+ $wgOut->addHtml( '<tr><td>'.Xml::submitButton(wfMsg( 'poll-submit' )).'</td></tr>' );
 56+ $wgOut->addHtml( Xml::closeElement( table ) );
 57+ $wgOut->addHtml( Xml::closeElement( form ) );
5858 }
5959 }
6060

Comments

#Comment by Jan Luca (talk | contribs)   15:18, 11 May 2009

See also r50481

Status & tagging log