X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2Feditpage%2FTextConflictHelper.php;h=b447b18f94db341ede4ed5adcd68a490f5865851;hb=fb9a36c04916abad824e1f0f5c6f23bb859d5c17;hp=6e7e7ee6eef206709e324ac2d66df158be83091e;hpb=643ebd78e43d04553a1f581e1b6607c2706dcfce;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/editpage/TextConflictHelper.php b/includes/editpage/TextConflictHelper.php index 6e7e7ee6ee..b447b18f94 100644 --- a/includes/editpage/TextConflictHelper.php +++ b/includes/editpage/TextConflictHelper.php @@ -162,6 +162,33 @@ class TextConflictHelper { ); } + /** + * HTML to build the textbox1 on edit conflicts + * + * @param mixed[]|null $customAttribs + * @return string HTML + */ + public function getEditConflictMainTextBox( $customAttribs = [] ) { + $builder = new TextboxBuilder(); + $classes = $builder->getTextboxProtectionCSSClasses( $this->title ); + + $attribs = [ 'tabindex' => 1 ]; + $attribs += $customAttribs; + + $attribs = $builder->mergeClassesIntoAttributes( $classes, $attribs ); + + $attribs = $builder->buildTextboxAttribs( + 'wpTextbox1', + $attribs, + $this->out->getUser(), + $this->title + ); + + $this->out->addHTML( + Html::textarea( 'wpTextbox1', $builder->addNewLineAtEnd( $this->storedversion ), $attribs ) + ); + } + /** * Content to go in the edit form before textbox1 *