• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5617: Pattern skin editform.tmpl doesn't make a copy of template topic text

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension PatternSkin Normal No Action Required   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

I've been trying to allow users to create new topics based upon a combination of:
  1. An embedded HTML form that calls the edit script using "action=form"
  2. A topic Form template
  3. A topic view template, and
  4. A topic content template

The idea here is to stick to HTML forms and buttons, without having people need to press the edit button. It's for a sort of meeting database into which people can add meeting notes or meeting actions.I'm using the CommentPlugin to create meeting notes and actions.

  1. The view template has the COMMENT forms in it
  2. The template topic has anchors, into which the COMMENTS (actions or notes) are attached

Anyway, the problem is that if you call "edit" with "action=form" as follows:

<form action='%SCRIPTURLPATH{"edit"}%/%BASEWEB%/ContactReportAUTOINC0001' name="createContactReport">
%MAKETEXT{"Create a new contact report by clicking"}%
<input type="hidden" name="t" value="%SERVERTIME{$hou$min$sec}%" />
<input type="hidden" name="templatetopic" value="%WEB%.ContactReportTemplate" />
<input type="hidden" name="parenttopic" value="%WEB%.ContactReports" />
<input type="hidden" name="action" value="form" />
<input type="submit" class="twikiSubmit" value='%MAKETEXT{"Create New Contact Report"}%' />
</form>

Using pattern skin, then the content of ContactReportTemplate isn't getting copied into the the topic body when it's created.

I've fixed it using the following moified editform.tmpl, but I'm not sure if it's a sound change.

%{ This is a default template }%%TMPL:INCLUDE{"edit"}%

%TMPL:DEF{"focus"}%%TMPL:END%
%TMPL:DEF{"titleaction"}%%MAKETEXT{"(edit form)"}% %TMPL:END%
%TMPL:DEF{"pagetitle"}%<nop>%TOPIC% %MAKETEXT{"(edit form)"}%%TMPL:END%
%TMPL:DEF{"footernote"}% %TMPL:END%

%TMPL:DEF{"content"}%%TMPL:P{"formstart"}%%TMPL:P{"formbottom"}%
<input type="hidden" id="topic" name="text" value="%TEXT%" />
%TMPL:P{"topicinfo"}%
%TMPL:P{"formend"}%%TMPL:END

Have I got this right?

Can we get this, and possibly similar changes, rolled into the next release?

-- TWiki:Main/GrantTraynor - 09 May 2008

This has been noted in Item5547.

-- TWiki:Main.ArthurClemens - 10 May 2008

ItemTemplate
Summary Pattern skin editform.tmpl doesn't make a copy of template topic text
ReportedBy TWiki:Main.GrantTraynor
Codebase 4.2.0
SVN Range TWiki-5.0.0, Sun, 04 May 2008, build 16770
AppliesTo Extension
Component PatternSkin
Priority Normal
CurrentState No Action Required
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r2 - 2008-05-10 - ArthurClemens
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback