• 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.

Item5726: Changing a form when the old form has mandatory fields which are empty causes bogus error

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   patch 4.2.1

Edit Form Data

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

Detail

Changing a form when the old form has mandatory fields which are empty causes bogus error

To reproduce you need a topic containing a form.

This form must have at least one mandatory field.

Leave this field empty.

There is now a Javascript function that validate if mandatory fields are empty. This does not validate if you cancel out. If you change form it validates which means you have to put some random text into the mandatory fields to change to another form. This is confusing and makes no sense. The Change Form button should have the same onclick="suppressTWikiSaveValidation() that cancel has.

It is very confusing the way the whole thing is built up. If I add this to the form.tmpl then in all other skins than those that load twiki_edit.js OR are the Wysiwyg editor in action will fail because the suppressTWikiSaveValidation() is not defined.

It would be so much simpler if each "screen" had its own template file instead of all these includes of an include of an include that includes an include. It has become too much of a patchwork for anyone to have an overview of the consequences of any changes.

-- TWiki:Main/KennethLavrsen - 22 Jun 2008

The error is only present in the skins that have implemented the javascript that checks mandatory fields

If we add the javascript call in the generic form.tmpl you get js errors in non pattern skin

So the solution I chose was to modify the Change Form button in the pattern skin and that required a new template file.

-- TWiki:Main.KennethLavrsen - 22 Jun 2008

ItemTemplate
Summary Changing a form when the old form has mandatory fields which are empty causes bogus error
ReportedBy TWiki:Main.KennethLavrsen
Codebase 4.2.1, ~twiki4
SVN Range TWiki-5.0.0, Sun, 01 Jun 2008, build 16865
AppliesTo Engine
Component

Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:16920 TWikirev:16921 TWikirev:16924 TWikirev:16925
TargetRelease patch
ReleasedIn 4.2.1
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2008-08-04 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback