- $titleObj = $this->getPageTitle();
- $action = $titleObj->getLocalURL( [ 'action' => 'submit' ] );
- # Start the form here
- $top = Xml::openElement(
- 'form',
- [
- 'method' => 'post',
- 'action' => $action,
- 'id' => 'merge'
- ]
- );
- $out->addHTML( $top );
-
- if ( $haveRevisions ) {
- # Format the user-visible controls (comment field, submission button)
- # in a nice little table
- $table =
- Xml::openElement( 'fieldset' ) .
- $this->msg( 'mergehistory-merge', $this->mTargetObj->getPrefixedText(),
- $this->mDestObj->getPrefixedText() )->parse() .
- Xml::openElement( 'table', [ 'id' => 'mw-mergehistory-table' ] ) .
- '<tr>
- <td class="mw-label">' .
- Xml::label( $this->msg( 'mergehistory-reason' )->text(), 'wpComment' ) .
- '</td>
- <td class="mw-input">' .
- Xml::input( 'wpComment', 50, $this->mComment, [ 'id' => 'wpComment' ] ) .
- '</td>
- </tr>
- <tr>
- <td> </td>
- <td class="mw-submit">' .
- Xml::submitButton(
- $this->msg( 'mergehistory-submit' )->text(),
- [ 'name' => 'merge', 'id' => 'mw-merge-submit' ]
- ) .
- '</td>
- </tr>' .
- Xml::closeElement( 'table' ) .
- Xml::closeElement( 'fieldset' );
-
- $out->addHTML( $table );
- }
-
- $out->addHTML(
- '<h2 id="mw-mergehistory">' .
- $this->msg( 'mergehistory-list' )->escaped() . "</h2>\n"
- );