Index: trunk/extensions/CentralNotice/SpecialNoticeTemplate.php |
— | — | @@ -433,19 +433,24 @@ |
434 | 434 | $htmlOut .= Xml::label( wfMsg( 'centralnotice-banner-logged-in' ), 'displayAccount' ); |
435 | 435 | $htmlOut .= Xml::closeElement( 'p' ); |
436 | 436 | $htmlOut .= Xml::closeElement( 'fieldset' ); |
437 | | - |
438 | | - $htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-edit-template' ) ); |
439 | | - $htmlOut .= wfMsg( 'centralnotice-edit-template-summary' ); |
440 | | - $buttons = array(); |
441 | | - $buttons[] = '<a href="#" onclick="insertButton(\'hide\');return false;">' . wfMsg( 'centralnotice-hide-button' ) . '</a>'; |
442 | | - $buttons[] = '<a href="#" onclick="insertButton(\'translate\');return false;">' . wfMsg( 'centralnotice-translate-button' ) . '</a>'; |
443 | | - $htmlOut .= Xml::tags( 'div', |
444 | | - array( 'style' => 'margin-bottom: 0.2em;' ), |
445 | | - '<img src="'.$scriptPath.'/down-arrow.png" style="vertical-align:baseline;"/>' . wfMsg( 'centralnotice-insert', $wgLang->commaList( $buttons ) ) |
446 | | - ); |
447 | | - $htmlOut .= Xml::textarea( 'templateBody', $body, 60, 20, $readonly ); |
448 | | - $htmlOut .= Xml::closeElement( 'fieldset' ); |
449 | 437 | if ( $this->editable ) { |
| 438 | + $htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-edit-template' ) ); |
| 439 | + $htmlOut .= wfMsg( 'centralnotice-edit-template-summary' ); |
| 440 | + $buttons = array(); |
| 441 | + $buttons[] = '<a href="#" onclick="insertButton(\'hide\');return false;">' . wfMsg( 'centralnotice-hide-button' ) . '</a>'; |
| 442 | + $buttons[] = '<a href="#" onclick="insertButton(\'translate\');return false;">' . wfMsg( 'centralnotice-translate-button' ) . '</a>'; |
| 443 | + $htmlOut .= Xml::tags( 'div', |
| 444 | + array( 'style' => 'margin-bottom: 0.2em;' ), |
| 445 | + '<img src="'.$scriptPath.'/down-arrow.png" style="vertical-align:baseline;"/>' . wfMsg( 'centralnotice-insert', $wgLang->commaList( $buttons ) ) |
| 446 | + ); |
| 447 | + $htmlOut .= Xml::textarea( 'templateBody', $body, 60, 20, $readonly ); |
| 448 | + $htmlOut .= Xml::closeElement( 'fieldset' ); |
| 449 | + } else { |
| 450 | + $htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-banner' ) ); |
| 451 | + $htmlOut .= Xml::textarea( 'templateBody', $body, 60, 20, $readonly ); |
| 452 | + $htmlOut .= Xml::closeElement( 'fieldset' ); |
| 453 | + } |
| 454 | + if ( $this->editable ) { |
450 | 455 | $htmlOut .= Xml::hidden( 'authtoken', $wgUser->editToken() ); |
451 | 456 | $htmlOut .= Xml::tags( 'div', |
452 | 457 | array( 'class' => 'cn-buttons' ), |