@@ 4147-4166 (lines=20) @@ | ||
4144 | if ( !$this->isNew ) { |
|
4145 | $checkboxes['minor'] = ''; |
|
4146 | $minorLabel = $this->context->msg( 'minoredit' )->parse(); |
|
4147 | if ( $wgUser->isAllowed( 'minoredit' ) ) { |
|
4148 | $attribs = [ |
|
4149 | 'tabindex' => ++$tabindex, |
|
4150 | 'accesskey' => $this->context->msg( 'accesskey-minoredit' )->text(), |
|
4151 | 'id' => 'wpMinoredit', |
|
4152 | ]; |
|
4153 | $minorEditHtml = |
|
4154 | Xml::check( 'wpMinoredit', $checked['minor'], $attribs ) . |
|
4155 | " <label for='wpMinoredit' id='mw-editpage-minoredit'" . |
|
4156 | Xml::expandAttributes( [ 'title' => Linker::titleAttrib( 'minoredit', 'withaccess' ) ] ) . |
|
4157 | ">{$minorLabel}</label>"; |
|
4158 | ||
4159 | if ( $wgUseMediaWikiUIEverywhere ) { |
|
4160 | $checkboxes['minor'] = Html::openElement( 'div', [ 'class' => 'mw-ui-checkbox' ] ) . |
|
4161 | $minorEditHtml . |
|
4162 | Html::closeElement( 'div' ); |
|
4163 | } else { |
|
4164 | $checkboxes['minor'] = $minorEditHtml; |
|
4165 | } |
|
4166 | } |
|
4167 | } |
|
4168 | ||
4169 | $watchLabel = $this->context->msg( 'watchthis' )->parse(); |
|
@@ 4171-4189 (lines=19) @@ | ||
4168 | ||
4169 | $watchLabel = $this->context->msg( 'watchthis' )->parse(); |
|
4170 | $checkboxes['watch'] = ''; |
|
4171 | if ( $wgUser->isLoggedIn() ) { |
|
4172 | $attribs = [ |
|
4173 | 'tabindex' => ++$tabindex, |
|
4174 | 'accesskey' => $this->context->msg( 'accesskey-watch' )->text(), |
|
4175 | 'id' => 'wpWatchthis', |
|
4176 | ]; |
|
4177 | $watchThisHtml = |
|
4178 | Xml::check( 'wpWatchthis', $checked['watch'], $attribs ) . |
|
4179 | " <label for='wpWatchthis' id='mw-editpage-watch'" . |
|
4180 | Xml::expandAttributes( [ 'title' => Linker::titleAttrib( 'watch', 'withaccess' ) ] ) . |
|
4181 | ">{$watchLabel}</label>"; |
|
4182 | if ( $wgUseMediaWikiUIEverywhere ) { |
|
4183 | $checkboxes['watch'] = Html::openElement( 'div', [ 'class' => 'mw-ui-checkbox' ] ) . |
|
4184 | $watchThisHtml . |
|
4185 | Html::closeElement( 'div' ); |
|
4186 | } else { |
|
4187 | $checkboxes['watch'] = $watchThisHtml; |
|
4188 | } |
|
4189 | } |
|
4190 | Hooks::run( 'EditPageBeforeEditChecks', [ &$this, &$checkboxes, &$tabindex ] ); |
|
4191 | return $checkboxes; |
|
4192 | } |