It's getting more difficult to navigate the files in includes/htmlform/ with every new field and every new helper class that is being added. Change-Id: I92ce2356baf6151f17b2440970d5abdf86503820
51 lines
992 B
PHP
51 lines
992 B
PHP
<?php
|
|
|
|
class HTMLEditTools extends HTMLFormField {
|
|
public function getInputHTML( $value ) {
|
|
return '';
|
|
}
|
|
|
|
public function getTableRow( $value ) {
|
|
$msg = $this->formatMsg();
|
|
|
|
return
|
|
'<tr><td></td><td class="mw-input">' .
|
|
'<div class="mw-editTools">' .
|
|
$msg->parseAsBlock() .
|
|
"</div></td></tr>\n";
|
|
}
|
|
|
|
/**
|
|
* @param string $value
|
|
* @return string
|
|
* @since 1.20
|
|
*/
|
|
public function getDiv( $value ) {
|
|
$msg = $this->formatMsg();
|
|
|
|
return '<div class="mw-editTools">' . $msg->parseAsBlock() . '</div>';
|
|
}
|
|
|
|
/**
|
|
* @param string $value
|
|
* @return string
|
|
* @since 1.20
|
|
*/
|
|
public function getRaw( $value ) {
|
|
return $this->getDiv( $value );
|
|
}
|
|
|
|
protected function formatMsg() {
|
|
if ( empty( $this->mParams['message'] ) ) {
|
|
$msg = $this->msg( 'edittools' );
|
|
} else {
|
|
$msg = $this->getMessage( $this->mParams['message'] );
|
|
if ( $msg->isDisabled() ) {
|
|
$msg = $this->msg( 'edittools' );
|
|
}
|
|
}
|
|
$msg->inContentLanguage();
|
|
|
|
return $msg;
|
|
}
|
|
}
|