Last modified: 2010-05-15 16:03:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T16491, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 14491 - Add new global for toolbar relocation in EditPage
Add new global for toolbar relocation in EditPage
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.13.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-09 22:05 UTC by Lisa Ridley
Modified: 2010-05-15 16:03 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patches DefaultSettings.php to add a new global configuration variable, and patches EditPage.php to implement repositioning the toolbar (1.72 KB, patch)
2009-01-22 16:21 UTC, Lisa Ridley
Details

Description Lisa Ridley 2008-06-09 22:05:16 UTC
Currently the toolbar in EditPage gets triggered to display before the hook 'EditPage::showEditForm:fields'.  This hook can be used to add custom edit fields to EditPage; however it is not always advantageous to display the toolbar above any custom edit fields.

It would be optimal if we could add a global configuration setting to DefaultSettings.php called $wgShowToolbarBeforeShowEditFormfields (or something like that), with a default value of true to display the toolbar where it is currently located.  Setting this value to false would display the toolbar after the hook 'EditPage::showEditForm:fields' is triggered, perhaps on line 1356 (version 1.13alpha) right above "{$commentsubject}".  This would place the toolbar below any custom edit fields, but above textarea "wpTextbox1".
Comment 1 Siebrand Mazeland 2008-08-13 21:30:09 UTC
Please provide a patch for review.
Comment 2 Lisa Ridley 2009-01-22 16:21:35 UTC
Created attachment 5722 [details]
Patches DefaultSettings.php to add a new global configuration variable, and patches EditPage.php to implement repositioning the toolbar

This patch adds a new global configuration variable, $wgShowToolbarAfterEditFormFieldsHook, which can be used to reposition the edit toolbar below any HTML elements added through the hook 'EditPage::showEditForm:fields'.  By setting this configuration variable to true, the toolbar will show up on the edit screen after any elements added through this hook, but above the standard textbox edit field; leaving this setting at its default (false) will position the toolbar above these elements, as it appears before this patch is implemented.
Comment 3 Niklas Laxström 2009-01-22 16:34:13 UTC
What is the use case for this?
Comment 4 Lisa Ridley 2009-01-22 17:30:28 UTC
The hook EditPage::showEditForm:fields can be used to add form fields to the edit page, which can be used to capture information in addition to the standard textbox, wpTextBox1.  (The processing of any data entered in these form fields is handled in a later hook).

Currently, the toolbar gets positioned above any HTML elements (i.e., form fields) added through EditPage::showEditForm:fields; however it is only functional in wpTextbox1 and  wpTextbox2 by default.  This patch adds a new configuration variable that can be used to position the toolbar below any HTML elements added through EditPage::showEditForm:fields, but still have it show up above the standard edit boxes, wpTextbox1 and wpTextbox2.

The default value is false, which will leave the toolbar in its current position; setting this to true would reposition the toolbar to show up after any HTML elements added using EditPage::showEditForm:fields.
Comment 5 Lisa Ridley 2010-02-08 06:01:03 UTC
This is no longer an issue, and can be worked around by utilizing a different hook, EditPage::showEditForm:initial, for attaching edit form fields to the edit page.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links