MediaWiki
REL1_24
|
00001 <?php 00002 00010 class HTMLButtonField extends HTMLFormField { 00011 protected $buttonType = 'button'; 00012 00013 public function __construct( $info ) { 00014 $info['nodata'] = true; 00015 parent::__construct( $info ); 00016 } 00017 00018 public function getInputHTML( $value ) { 00019 $attr = array( 00020 'class' => 'mw-htmlform-submit ' . $this->mClass, 00021 'id' => $this->mID, 00022 ) + $this->getAttributes( array( 'disabled', 'tabindex' ) ); 00023 00024 return Html::input( $this->mName, $value, $this->buttonType, $attr ); 00025 } 00026 00027 protected function needsLabel() { 00028 return false; 00029 } 00030 00039 public function validate( $value, $alldata ) { 00040 return true; 00041 } 00042 }