- return Xml::openElement( 'form', [ 'method' => 'get', 'action' => wfScript() ] ) .
- Xml::openElement( 'fieldset' ) .
- Xml::element( 'legend', [], $this->msg( 'protectedpages' )->text() ) .
- Html::hidden( 'title', $title->getPrefixedDBkey() ) . "\n" .
- $this->getNamespaceMenu( $namespace ) . "\n" .
- $this->getTypeMenu( $type ) . "\n" .
- $this->getLevelMenu( $level ) . "\n" .
- "<br />\n" .
- $this->getExpiryCheck( $indefOnly ) . "\n" .
- $this->getCascadeCheck( $cascadeOnly ) . "\n" .
- $this->getRedirectCheck( $noRedirect ) . "\n" .
- "<br />\n" .
- $this->getSizeLimit( $sizetype, $size ) . "\n" .
- Xml::submitButton( $this->msg( 'protectedpages-submit' )->text() ) . "\n" .
- Xml::closeElement( 'fieldset' ) .
- Xml::closeElement( 'form' );
+ 'expirycheck' => $this->getExpiryCheck( $indefOnly ),
+ 'cascadecheck' => $this->getCascadeCheck( $cascadeOnly ),
+ 'redirectcheck' => $this->getRedirectCheck( $noRedirect ),
+
+ 'sizelimit' => $this->getSizeLimit( $sizetype, $size ),
+ ];
+ $htmlForm = new HTMLForm( $formDescriptor, $this->getContext() );
+ $htmlForm
+ ->setMethod( 'get' )
+ ->setWrapperLegendMsg( 'protectedpages' )
+ ->setSubmitText( $this->msg( 'protectedpages-submit' )->text() );
+
+ return $htmlForm->prepareForm()->getHTML( false );