r23442 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23441‎ | r23442 | r23443 >
Date:21:49, 26 June 2007
Author:robchurch
Status:old
Tags:
Comment:
* Wrap fields in a <fieldset>
* Change result label to a heading
Modified paths:
  • /trunk/extensions/ExpandTemplates/ExpandTemplates.i18n.php (modified) (history)
  • /trunk/extensions/ExpandTemplates/ExpandTemplates_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ExpandTemplates/ExpandTemplates_body.php
@@ -59,6 +59,7 @@
6060 private function makeForm( $title, $removeComments, $input ) {
6161 $self = $this->getTitle();
6262 $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl() ) );
 63+ $form .= "<fieldset><legend>" . wfMsgHtml( 'expandtemplates' ) . "</legend>\n";
6364 $form .= '<p>' . Xml::inputLabel( wfMsgNoTrans( 'expand_templates_title' ), 'contexttitle', 'contexttitle', 60, $title ) . '</p>';
6465 $form .= '<p>' . Xml::label( wfMsg( 'expand_templates_input' ), 'input' ) . '</p>';
6566 $form .= Xml::openElement( 'textarea', array( 'name' => 'input', 'id' => 'input', 'rows' => 10, 'cols' => 10 ) );
@@ -66,18 +67,19 @@
6768 $form .= Xml::closeElement( 'textarea' );
6869 $form .= '<p>' . Xml::checkLabel( wfMsg( 'expand_templates_remove_comments' ), 'removecomments', 'removecomments', $removeComments ) . '</p>';
6970 $form .= '<p>' . Xml::submitButton( wfMsg( 'expand_templates_ok' ) ) . '</p>';
 71+ $form .= "</fieldset>\n";
7072 $form .= Xml::closeElement( 'form' );
7173 return $form;
7274 }
7375
7476 /**
75 - * Generate a nice little box with a label for output
 77+ * Generate a nice little box with a heading for output
7678 *
7779 * @param $output Wiki text output
7880 * @return string
7981 */
8082 private function makeOutput( $output ) {
81 - $out = '<p>' . Xml::label( wfMsg( 'expand_templates_output' ), 'output' ) . '</p>';
 83+ $out = "<h2>" . wfMsgHtml( 'expand_templates_output' ) . "</h2>\n";
8284 $out .= Xml::openElement( 'textarea', array( 'id' => 'output', 'rows' => 10, 'cols' => 10, 'readonly' => 'readonly' ) );
8385 $out .= htmlspecialchars( $output );
8486 $out .= Xml::closeElement( 'textarea' );
Index: trunk/extensions/ExpandTemplates/ExpandTemplates.i18n.php
@@ -16,7 +16,7 @@
1717 It does this by calling the relevant parser stage from MediaWiki itself.',
1818 'expand_templates_title' => 'Context title, for {{PAGENAME}} etc.:',
1919 'expand_templates_input' => 'Input text:',
20 - 'expand_templates_output' => 'Result:',
 20+ 'expand_templates_output' => 'Result',
2121 'expand_templates_ok' => 'OK',
2222 'expand_templates_remove_comments' => 'Remove comments',
2323 'expand_templates_preview' => 'Preview',

Follow-up revisions

RevisionCommit summaryAuthorDate
r23443Update for r23442robchurch21:53, 26 June 2007

Status & tagging log