Instead of disabling the 'Compare selected revisions' button when there's only one revision, just don't show it.
We don't show any radio buttons in this case either, so there's nothing to consider submitting if we wanted to; it's cleaner to just leave it out.
*/
function submitButton( $bits = array() ) {
# Disable submit button if history has 1 revision only
- if ( $this->linesonpage == 1 ) {
- $bits = $bits + array( 'disabled' => 'disabled' );
- }
- return Xml::submitButton( wfMsg( 'compareselectedversions' ),
+ if ( $this->linesonpage > 1 ) {
+ return Xml::submitButton( wfMsg( 'compareselectedversions' ),
$bits + array(
'class' => 'historysubmit',
'accesskey' => wfMsg( 'accesskey-compareselectedversions' ),
'title' => wfMsg( 'tooltip-compareselectedversions' ),
)
);
+ } else {
+ return '';
+ }
}
/**