From 8ca85d62c1f6113994cc3c634dacbc8205502f30 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Thu, 17 Apr 2008 19:16:27 +0000 Subject: [PATCH] * Clean up a little --- includes/SpecialProtectedpages.php | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/includes/SpecialProtectedpages.php b/includes/SpecialProtectedpages.php index 3d7d6303c4..68d4b45dd7 100644 --- a/includes/SpecialProtectedpages.php +++ b/includes/SpecialProtectedpages.php @@ -128,7 +128,7 @@ class ProtectedPagesForm { $this->getNamespaceMenu( $namespace ) . " \n" . $this->getTypeMenu( $type ) . " \n" . $this->getLevelMenu( $level ) . " \n" . - "
  " . + "
  " . $this->getExpiryCheck( $indefOnly ) . " \n" . $this->getSizeLimit( $sizetype, $size ) . " \n" . "" . @@ -154,22 +154,24 @@ class ProtectedPagesForm { * @return string Formatted HTML */ protected function getExpiryCheck( $indefOnly ) { - $out = Xml::check( 'indefonly', $indefOnly, array('id' => 'indefonly') ) . ' '; - $out .= Xml::label( wfMsg("protectedpages-indef"), 'indefonly' ) . "\n"; - return $out; + return + Xml::checkLabel( wfMsg('protectedpages-indef'), 'indefonly', 'indefonly', $indefOnly ) . "\n"; } /** * @return string Formatted HTML */ protected function getSizeLimit( $sizetype, $size ) { - $out = Xml::radio( 'sizetype', 'min', ($sizetype=='min'), array('id' => 'wpmin') ); - $out .= Xml::label( wfMsg("minimum-size"), 'wpmin' ); - $out .= " ".Xml::radio( 'sizetype', 'max', ($sizetype=='max'), array('id' => 'wpmax') ); - $out .= Xml::label( wfMsg("maximum-size"), 'wpmax' ); - $out .= " ".Xml::input('size', 9, $size, array( 'id' => 'wpsize' ) ); - $out .= ' '.wfMsgHtml('pagesize'); - return $out; + $max = $sizetype === 'max'; + + return + Xml::radioLabel( wfMsg('minimum-size'), 'sizetype', 'min', 'wpmin', !$max ) . + ' ' . + Xml::radioLabel( wfMsg('maximum-size'), 'sizetype', 'max', 'wpmax', $max ) . + ' ' . + Xml::input( 'size', 9, $size, array( 'id' => 'wpsize' ) ) . + ' ' . + Xml::label( wfMsg('pagesize'), 'wpsize' ); } /** -- 2.20.1