Index: trunk/phase3/skins/common/wikibits.js |
— | — | @@ -333,7 +333,14 @@ |
334 | 334 | // copied and adapted from phpBB |
335 | 335 | function insertTags(tagOpen, tagClose, sampleText) { |
336 | 336 | |
337 | | - var txtarea = document.editform.wpTextbox1; |
| 337 | + if (document.editform) |
| 338 | + var txtarea = document.editform.wpTextbox1; |
| 339 | + else { |
| 340 | + // some alternate form? take the first one we can find |
| 341 | + var areas = document.getElementsByTagName('textarea'); |
| 342 | + var txtarea = areas[0]; |
| 343 | + } |
| 344 | + |
338 | 345 | // IE |
339 | 346 | if(document.selection && !is_gecko) { |
340 | 347 | var theSelection = document.selection.createRange().text; |
Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -847,6 +847,14 @@ |
848 | 848 | if( is_callable( $formCallback ) ) { |
849 | 849 | call_user_func_array( $formCallback, array( &$wgOut ) ); |
850 | 850 | } |
| 851 | + |
| 852 | + // Put these up at the top to ensure they aren't lost on early form submission |
| 853 | + $wgOut->addHTML( " |
| 854 | +<input type='hidden' value=\"" . htmlspecialchars( $this->section ) . "\" name=\"wpSection\" /> |
| 855 | +<input type='hidden' value=\"{$this->starttime}\" name=\"wpStarttime\" />\n |
| 856 | +<input type='hidden' value=\"{$this->edittime}\" name=\"wpEdittime\" />\n |
| 857 | +<input type='hidden' value=\"{$this->scrolltop}\" name=\"wpScrolltop\" id=\"wpScrolltop\" />\n" ); |
| 858 | + |
851 | 859 | $wgOut->addHTML( <<<END |
852 | 860 | $recreate |
853 | 861 | {$commentsubject} |
— | — | @@ -855,11 +863,20 @@ |
856 | 864 | END |
857 | 865 | . htmlspecialchars( $this->safeUnicodeOutput( $this->textbox1 ) ) . |
858 | 866 | " |
859 | | -</textarea><br /> |
| 867 | +</textarea> |
| 868 | + |
| 869 | + " ); |
| 870 | + |
| 871 | + $wgOut->addWikiText( $copywarn ); |
| 872 | + |
| 873 | + $wgOut->addHTML( " |
860 | 874 | {$metadata} |
861 | 875 | {$editsummary} |
862 | 876 | {$checkboxhtml} |
863 | 877 | {$safemodehtml} |
| 878 | +"); |
| 879 | + |
| 880 | + $wgOut->addHTML( " |
864 | 881 | <div class='editButtons'> |
865 | 882 | <input tabindex='5' id='wpSave' type='submit' value=\"{$save}\" name=\"wpSave\" accesskey=\"".wfMsg('accesskey-save')."\"". |
866 | 883 | " title=\"".wfMsg('tooltip-save')."\"/> |
— | — | @@ -868,16 +885,15 @@ |
869 | 886 | <input tabindex='7' id='wpDiff' type='submit' value=\"{$diff}\" name=\"wpDiff\" accesskey=\"".wfMsg('accesskey-diff')."\"". |
870 | 887 | " title=\"".wfMsg('tooltip-diff')."\"/> <span class='editHelp'>{$cancel} | {$edithelp}</span></div> |
871 | 888 | </div> |
| 889 | +" ); |
| 890 | + |
| 891 | + $wgOut->addWikiText( wfMsgForContent( 'edittools' ) ); |
| 892 | + |
| 893 | + $wgOut->addHTML( " |
872 | 894 | <div class='templatesUsed'> |
873 | 895 | {$templates} |
874 | 896 | </div> |
875 | 897 | " ); |
876 | | - $wgOut->addWikiText( $copywarn ); |
877 | | - $wgOut->addHTML( " |
878 | | -<input type='hidden' value=\"" . htmlspecialchars( $this->section ) . "\" name=\"wpSection\" /> |
879 | | -<input type='hidden' value=\"{$this->starttime}\" name=\"wpStarttime\" />\n |
880 | | -<input type='hidden' value=\"{$this->edittime}\" name=\"wpEdittime\" />\n |
881 | | -<input type='hidden' value=\"{$this->scrolltop}\" name=\"wpScrolltop\" id=\"wpScrolltop\" />\n" ); |
882 | 898 | |
883 | 899 | if ( $wgUser->isLoggedIn() ) { |
884 | 900 | /** |
Index: trunk/phase3/includes/SpecialUpload.php |
— | — | @@ -659,6 +659,16 @@ |
660 | 660 | <td></td> |
661 | 661 | <td align='left'><input tabindex='9' type='submit' name='wpUpload' value=\"{$ulb}\" /></td> |
662 | 662 | </tr> |
| 663 | + |
| 664 | + <tr> |
| 665 | + <td></td> |
| 666 | + <td align='left'> |
| 667 | + " ); |
| 668 | + $wgOut->addWikiText( wfMsgForContent( 'edittools' ) ); |
| 669 | + $wgOut->addHTML( " |
| 670 | + </td> |
| 671 | + </tr> |
| 672 | + |
663 | 673 | </table> |
664 | 674 | </form>" ); |
665 | 675 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -274,6 +274,10 @@ |
275 | 275 | * Fix custom namespaces on wikis set for Portuguese |
276 | 276 | * Major overhaul of Special:Userlogin |
277 | 277 | * Update ipblocks table in MySQL 5 table defs |
| 278 | +* (bug 4100, 3049) Add 'edittools' message to hold edit tools, put it |
| 279 | + on Special:Upload as well as edit, rearrange edit page pieces a bit. |
| 280 | + Copyright warning now above the buttons to ensure it's visible, |
| 281 | + template list at the bottom so it can grow. |
278 | 282 | |
279 | 283 | |
280 | 284 | === Caveats === |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -791,6 +791,7 @@ |
792 | 792 | the text into a text file and save it for later.</strong>', |
793 | 793 | 'protectedpagewarning' => "<strong>WARNING: This page has been locked so that only users with sysop privileges can edit it. Be sure you are following the [[Project:Protected_page_guidelines|protected page guidelines]].</strong>", |
794 | 794 | 'templatesused' => 'Templates used on this page:', |
| 795 | +'edittools' => '<!-- Text here will be shown below edit and upload forms. -->', |
795 | 796 | |
796 | 797 | # History pages |
797 | 798 | # |