r69827 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69826‎ | r69827 | r69828 >
Date:10:11, 24 July 2010
Author:aaron
Status:ok
Tags:
Comment:
Hide 'unaccept' button when useless
Modified paths:
  • /trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php
@@ -870,18 +870,20 @@
871871 }
872872
873873 /**
 874+ * Generates review form submit buttons
874875 * @param FlaggedRevision $frev, the flagged revision, if any
875876 * @param bool $disabled, is the form disabled?
876877 * @param bool $rereview, force the review button to be usable?
877878 * @returns string
878 - * Generates one or two button submit for the review form
879879 */
880880 private static function submitButtons( $frev, $disabled, $rereview = false ) {
881881 $disAttrib = array( 'disabled' => 'disabled' );
882882 # Add the submit button
883883 if ( FlaggedRevs::binaryFlagging() ) {
 884+ # ACCEPT BUTTON: accept a revision
884885 # We may want to re-review to change the notes ($wgFlaggedRevsComments)
885 - $s = Xml::submitButton( wfMsg( 'revreview-submit-review' ),
 886+ # or re-review due to pending template/file changes
 887+ $s = Xml::submitButton( wfMsgHtml( 'revreview-submit-review' ),
886888 array(
887889 'name' => 'wpApprove',
888890 'id' => 'mw-fr-submitreview',
@@ -890,16 +892,19 @@
891893 wfMsg( 'revreview-ak-review' ) . ']'
892894 ) + ( ( $disabled || ( $frev && !$rereview ) ) ? $disAttrib : array() )
893895 );
 896+ # UNACCEPT BUTTON: revoke a revisions acceptance
 897+ # Hide if revision is not flagged
894898 $s .= ' ';
895 - $s .= Xml::submitButton( wfMsg( 'revreview-submit-unreview' ),
 899+ $s .= Xml::submitButton( wfMsgHtml( 'revreview-submit-unreview' ),
896900 array(
897901 'name' => 'wpUnapprove',
898902 'id' => 'mw-fr-submitunreview',
899 - 'title' => wfMsg( 'revreview-tt-unflag' )
900 - ) + ( ( $disabled || !$frev ) ? $disAttrib : array() )
 903+ 'title' => wfMsg( 'revreview-tt-unflag' ),
 904+ 'style' => $frev ? '' : 'visibility: hidden;'
 905+ ) + ( $disabled ? $disAttrib : array() )
901906 );
902907 } else {
903 - $s = Xml::submitButton( wfMsg( 'revreview-submit' ),
 908+ $s = Xml::submitButton( wfMsgHtml( 'revreview-submit' ),
904909 array(
905910 'id' => 'mw-fr-submitreview',
906911 'accesskey' => wfMsg( 'revreview-ak-review' ),

Status & tagging log