Separate editing the white board from editing the form
Motivation
I have recently implemented a separation of the standard twiki edit into two separate activities:
- Edit the white board (i.e., the text area)
- Edit the form
Actually there is a third activity:
- Edit the attachment table.
I am looking for feedback on this idea and am wondering whether there is any interest in me packaging this feature up for public consumption.
Description
Basically, you see two buttons in the topic actions where there used to be one: (i) Edit and (ii) Edit form. The former edits the text area only, while the latter edits the form only.
--
ThomasWeigert - 21 Feb 2005
Impact and Available Solutions
Not user visible.
Documentation
The following URL parameter has been added to the edit script:
| Parameter |
Documentation |
Default |
action |
May have values form or text. If not set, the edit script behaves as usual. If the value is text, only the text is edited and the form is passed behind the scenes to the save script. If the value is form, then only the form is edited and the text is passed behind the scenes. |
(undefined) |
Examples
Please test this at
develop
.
Implementation
This feature has been implementated to be available to users, but now changes have been made to the view templates. Thus this feature can be used, for example, in skins.
Basically, a URL parameter has been added to the edit script,
action which has the value of either
form or
text. If it is not set, the script behaves as usual. If the value is
text, only the text is edited and the form is passed behind the scenes to save. If the value is
form, then only the form is edited and the text is passed behind the scenes.
The function
Form::passForEdit is extensively used in plugins that edit part of the text only (provided by
EditContrib).
In addition, the following bug fixes or enhancements were made during this implementation:
-
UI::generateChangeFormPage : For reasons I don't understand, CGI::input does not correctly generate code to select a radio button if used in this manner. Must only use checked field for the checked radio button.
- Moved handling of form change up to the top level rather than handling it after much unneeded tests and complicated passing the result back out.
In
SVN 4160
Discussion:
I can guess what your implementation is. Personally I'd really like to see a properly integrated approach, as alluded to in discussions about the topic object model. I don't see any difference between the whiteboard area and any other text or textarea form field, except that it's a bit bigger. I'd like to see a situation where individual form fields can be kicked into "edit mode" from the view screen. I just can't think of a way to do this without lots of javascript.
--
CrawfordCurrie - 21 Feb 2005
This is done.
--
ThomasWeigert - 01 May 2005
Nice feature!
--
PeterThoeny - 11 May 2005
The
[edit form] link should be part of the form table actually, probably instead of the form title TestForm.
--
ArthurClemens - 10 May 2005
Arthur, sorry for the confusion, but this is just an example of a custom layout that some user may have created. This feature just gives you the machinery to do that. Of course one can argue with how that user changed the layout, but that is actually not the point...
--
ThomasWeigert - 12 May 2005
OK, looks great.
Now Arthur and
MartinCleaver were discussing wehther the form information from the rgistration in Dakra should be at the top of the page or not.
This seems like a good one to have an example of.
Any volunteers?
--
AntonAylward - 23 Jun 2005
I have locally modified the Form support for two things:
- Show an
[Edit] link in the form table
- Hide the form if it's rendered from the template, if the setting/preference HIDETEMPLATEFORM is on. This way, you can choose where to render the form using the ==== tag anywhere in the topic (it works in DakarRelease)
I haven't commited it because I want some feedback before.
Comments?
-- RafaelAlvarez - 23 Jun 2005