- $wgOut->addModules( 'mediawiki.action.delete.file' );
-
- $checkWatch = $wgUser->getBoolOption( 'watchdeletion' ) || $wgUser->isWatched( $this->title );
- $form = Xml::openElement( 'form', [ 'method' => 'post', 'action' => $this->getAction(),
- 'id' => 'mw-img-deleteconfirm' ] ) .
- Xml::openElement( 'fieldset' ) .
- Xml::element( 'legend', null, wfMessage( 'filedelete-legend' )->text() ) .
- Html::hidden( 'wpEditToken', $wgUser->getEditToken( $this->oldimage ) ) .
- $this->prepareMessage( 'filedelete-intro' ) .
- Xml::openElement( 'table', [ 'id' => 'mw-img-deleteconfirm-table' ] ) .
- "<tr>
- <td class='mw-label'>" .
- Xml::label( wfMessage( 'filedelete-comment' )->text(), 'wpDeleteReasonList' ) .
- "</td>
- <td class='mw-input'>" .
- Xml::listDropDown(
- 'wpDeleteReasonList',
- wfMessage( 'filedelete-reason-dropdown' )->inContentLanguage()->text(),
- wfMessage( 'filedelete-reason-otherlist' )->inContentLanguage()->text(),
- '',
- 'wpReasonDropDown',
- 1
- ) .
- "</td>
- </tr>
- <tr>
- <td class='mw-label'>" .
- Xml::label( wfMessage( 'filedelete-otherreason' )->text(), 'wpReason' ) .
- "</td>
- <td class='mw-input'>" .
- Xml::input( 'wpReason', 60, $wgRequest->getText( 'wpReason' ), [
- 'type' => 'text',
- // HTML maxlength uses "UTF-16 code units", which means that characters outside BMP
- // (e.g. emojis) count for two each. This limit is overridden in JS to instead count
- // Unicode codepoints (or 255 UTF-8 bytes for old schema).
- 'maxlength' => $oldCommentSchema ? 255 : CommentStore::COMMENT_CHARACTER_LIMIT,
- 'tabindex' => '2',
- 'id' => 'wpReason'
- ] ) .
- "</td>
- </tr>
- {$suppress}";