Index: trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php |
— | — | @@ -870,18 +870,20 @@ |
871 | 871 | } |
872 | 872 | |
873 | 873 | /** |
| 874 | + * Generates review form submit buttons |
874 | 875 | * @param FlaggedRevision $frev, the flagged revision, if any |
875 | 876 | * @param bool $disabled, is the form disabled? |
876 | 877 | * @param bool $rereview, force the review button to be usable? |
877 | 878 | * @returns string |
878 | | - * Generates one or two button submit for the review form |
879 | 879 | */ |
880 | 880 | private static function submitButtons( $frev, $disabled, $rereview = false ) { |
881 | 881 | $disAttrib = array( 'disabled' => 'disabled' ); |
882 | 882 | # Add the submit button |
883 | 883 | if ( FlaggedRevs::binaryFlagging() ) { |
| 884 | + # ACCEPT BUTTON: accept a revision |
884 | 885 | # 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' ), |
886 | 888 | array( |
887 | 889 | 'name' => 'wpApprove', |
888 | 890 | 'id' => 'mw-fr-submitreview', |
— | — | @@ -890,16 +892,19 @@ |
891 | 893 | wfMsg( 'revreview-ak-review' ) . ']' |
892 | 894 | ) + ( ( $disabled || ( $frev && !$rereview ) ) ? $disAttrib : array() ) |
893 | 895 | ); |
| 896 | + # UNACCEPT BUTTON: revoke a revisions acceptance |
| 897 | + # Hide if revision is not flagged |
894 | 898 | $s .= ' '; |
895 | | - $s .= Xml::submitButton( wfMsg( 'revreview-submit-unreview' ), |
| 899 | + $s .= Xml::submitButton( wfMsgHtml( 'revreview-submit-unreview' ), |
896 | 900 | array( |
897 | 901 | 'name' => 'wpUnapprove', |
898 | 902 | '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() ) |
901 | 906 | ); |
902 | 907 | } else { |
903 | | - $s = Xml::submitButton( wfMsg( 'revreview-submit' ), |
| 908 | + $s = Xml::submitButton( wfMsgHtml( 'revreview-submit' ), |
904 | 909 | array( |
905 | 910 | 'id' => 'mw-fr-submitreview', |
906 | 911 | 'accesskey' => wfMsg( 'revreview-ak-review' ), |