cross
New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists
You are here: Foswiki>Tasks Web>Item11527 (08 Jul 2015, MichaelDaum)Edit Attach

Item11527: Expand %MACROs in WEBFORMS pref when displayed in the add/change form UI

pencil
Priority: Enhancement
Current State: Closed
Released In: 2.0.0
Target Release: major
Applies To: Engine
Component:
Branches: trunk
Reported By: PaulHarvey
Waiting For:
Last Change By: MichaelDaum
I'd like to get this into Release01x01, but maybe not for 1.1.5 until we get more testing done.

I really wanted to be able to do:
   * Set WEBFORMS = %FOO%.MyForm

To more easily manage distribution of a single set of DataForms to be used across many different instance webs.

In fact, this becomes a nice way to make it a SEARCH-driven, if you wanted to do that:
   * Set WEBFORMS = %SEARCH{"1" type="query" web="%FOOFORMSWEB%" topic="*Form" nonoise="on" format="$web.$topic" separator=","}%

-- PaulHarvey - 16 Feb 2012

I grepped all of trunk, there are only two callers to Foswiki::Form::getAvailableForms():
  • Foswiki::UI::Edit, to show the "add form" button (or not).
  • Foswiki::UI::ChangeForm, to show the list of available forms

I hate the way the code uses $metaObject->getPreference() instead of the Func API. That means we can't inherit WEBFORMS from parent webs, among other things.

If we were happy for WEBFORMS to behave like a normal pref, we wouldn't need any perl code for WEBFORMS at all. It should just be a %FORMAT{"%WEBFORMS%" ...}%.

Anyway, I believe I've changed nothing except that we expand %macros in the WEBFORMS pref before building the list of available forms.

-- PaulHarvey - 16 Feb 2012

Discovered the much earlier Item2478, closed as a duplicate of this.

In hindsight, perhaps I should have done a feature proposal. Let me know if you think I should

-- PaulHarvey - 16 Feb 2012

Chickened out of putting this into a patch release, let's make a 1.2.0 thing. Marking as done.

-- PaulHarvey - 07 Nov 2012 - 05:24
 

ItemTemplate edit

Summary Expand %MACROs in WEBFORMS pref when displayed in the add/change form UI
ReportedBy PaulHarvey
Codebase trunk
SVN Range
AppliesTo Engine
Component
Priority Enhancement
CurrentState Closed
WaitingFor
Checkins distro:c1b8c207fa51 distro:89193c167a59
TargetRelease major
ReleasedIn 2.0.0
CheckinsOnBranches trunk
trunkCheckins distro:c1b8c207fa51 distro:89193c167a59
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r7 - 08 Jul 2015, MichaelDaum - This page was cached on 21 Mar 2018 - 20:27.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License