Interchange

CVS log for interchange/lib/Vend/Form.pm

[BACK] Up to [Local Repository] / interchange / lib / Vend

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 2.76: download - view: text, markup, annotated - select for diffs
Sat May 10 14:39:53 2008 UTC (6 months, 1 week ago) by mheins
Branches: MAIN
CVS tags: STABLE_5_6-root, STABLE_5_6-branch, REL_5_7_1, REL_5_6_1, REL_5_5_3, HEAD
Diff to: previous 2.75: preferred, colored
Changes since revision 2.75: +5 -5 lines
* Make date widget formatting shorthand apply to time widget as well.

* User widgets called time* are unaffected if they don't use a non-word
  character in the callout.

* Examples:

		time.ampm    { type => 'time', ampm => 1 }
		time.blank   { type => 'time', blank => 1 }
        time.8-23    { type => 'time', start_hour => 8, end_hour => 23 }
        time.half    { type => 'time', minutes => 'half_hourly' }

Revision 2.75: download - view: text, markup, annotated - select for diffs
Tue Mar 25 17:13:21 2008 UTC (7 months, 3 weeks ago) by jon
Branches: MAIN
CVS tags: REL_5_5_2
Diff to: previous 2.74: preferred, colored
Changes since revision 2.74: +3 -3 lines
Various minor UTF-8 changes.

Correct attribution of &Vend::CharSet::display_chars (which is from
perluniintro manpage).

Enable localization of an error string.

Match content type more tightly in 2 spots ("text" is only trustworthy
in the MIME major type, not minor, and even that may be a stretch).

Simplify request method matching in a few places for readability and a
(trivial) performance benefit.

Use conventional $c lexical instead of $g for catalog hashref.

Fix tab/space differences to match context.

Update copyrights of files changed in 2008.

Revision 2.74: download - view: text, markup, annotated - select for diffs
Mon Feb 18 19:21:21 2008 UTC (9 months ago) by docelic
Branches: MAIN
Diff to: previous 2.73: preferred, colored
Changes since revision 2.73: +3 -3 lines

* Allow box-based option templates to access VALUE in addition to LABEL,
  so the following is possible:

	<img src="/images/{VALUE}.gif">&nbsp;{LABEL}

Revision 2.73: download - view: text, markup, annotated - select for diffs
Sun Dec 2 15:45:04 2007 UTC (11 months, 2 weeks ago) by mheins
Branches: MAIN
Diff to: previous 2.72: preferred, colored
Changes since revision 2.72: +17 -5 lines
* Add ability to set attrDefault for the Widget codedef type, which
  then transmits that to the opt hash prior to widget routine call.

* Add new ynzero widget, which does a 1/0 yes/no for integer type
  fields. Uses the new attrDefault capability.

Revision 2.72: download - view: text, markup, annotated - select for diffs
Fri Nov 9 03:08:31 2007 UTC (12 months, 1 week ago) by pajamian
Branches: MAIN
Diff to: previous 2.71: preferred, colored
Changes since revision 2.71: +3 -3 lines
Allow for the proper display of product options that use text or textarea
widgets by showing the actual value if a label doesn't exist for the value.

Revision 2.71: download - view: text, markup, annotated - select for diffs
Fri Aug 10 12:05:34 2007 UTC (15 months, 1 week ago) by racke
Branches: MAIN
CVS tags: REL_5_5_1, DEB_5_5_1_1_1, DEB_5_5_1
Diff to: previous 2.70: preferred, colored
Changes since revision 2.70: +10 -4 lines
Pass applylocale option into Vend::Form::options_to_array in order to
localize option labels (#80).

Revision 2.70: download - view: text, markup, annotated - select for diffs
Thu Aug 9 13:40:53 2007 UTC (15 months, 1 week ago) by pajamian
Branches: MAIN
Diff to: previous 2.69: preferred, colored
Changes since revision 2.69: +3 -3 lines
* Updated copyright headers to 2007 (closes bug #102)

* Added GPL and copyright headers to a few files that were missing them.

Revision 2.64.2.2: download - view: text, markup, annotated - select for diffs
Fri Mar 30 12:15:27 2007 UTC (19 months, 3 weeks ago) by pajamian
Branches: STABLE_5_4-branch
CVS tags: REL_5_4_3
Diff to: previous 2.64.2.1: preferred, colored; branchpoint 2.64: preferred, colored; next MAIN 2.65: preferred, colored
Changes since revision 2.64.2.1: +4 -4 lines
New Free Software Foundation Address in headers of various files

Revision 2.69: download - view: text, markup, annotated - select for diffs
Fri Mar 30 11:39:45 2007 UTC (19 months, 3 weeks ago) by pajamian
Branches: MAIN
Diff to: previous 2.68: preferred, colored
Changes since revision 2.68: +4 -4 lines
New Free Software Foundation Address in headers of various files

Revision 2.68: download - view: text, markup, annotated - select for diffs
Tue Sep 19 18:48:43 2006 UTC (2 years, 2 months ago) by jon
Branches: MAIN
Diff to: previous 2.67: preferred, colored
Changes since revision 2.67: +3 -3 lines
Allow year_end to be less than year_begin so that years in the date widget
can be shown in reverse order.

Patch from Bill Carr. Thanks!

Revision 2.67: download - view: text, markup, annotated - select for diffs
Wed Mar 8 18:22:08 2006 UTC (2 years, 8 months ago) by jon
Branches: MAIN
Diff to: previous 2.66: preferred, colored
Changes since revision 2.66: +4 -4 lines
Fix broken HTML by prepending a space to class attribute. Found and fixed
by Max Cohan <max@endpoint.com>.

Revision 2.66: download - view: text, markup, annotated - select for diffs
Thu Mar 2 23:19:19 2006 UTC (2 years, 8 months ago) by jon
Branches: MAIN
Diff to: previous 2.65: preferred, colored
Changes since revision 2.65: +9 -6 lines
In the date widget, if the date is blank (0000-00-00), treat a time of
00:00 as blank, not midnight, in the HTML option selection.

Revision 2.65: download - view: text, markup, annotated - select for diffs
Wed Nov 30 15:07:15 2005 UTC (2 years, 11 months ago) by racke
Branches: MAIN
Diff to: previous 2.64: preferred, colored
Changes since revision 2.64: +6 -6 lines
merged changes 2.64 vs 2.64.2.1
+++ 2.64.2.1 +++
don't use current time as default for date_blank

Revision 2.64.2.1: download - view: text, markup, annotated - select for diffs
Wed Nov 30 15:01:56 2005 UTC (2 years, 11 months ago) by racke
Branches: STABLE_5_4-branch
CVS tags: REL_5_4_2, REL_5_4_1, REL_5_4_0, REL_5_3_3
Diff to: previous 2.64: preferred, colored
Changes since revision 2.64: +6 -6 lines
don't use current time as default for date_blank

Revision 2.64: download - view: text, markup, annotated - select for diffs
Tue Nov 8 18:14:45 2005 UTC (3 years ago) by jon
Branches: MAIN
CVS tags: STABLE_5_4-root, REL_5_3_2
Branch point for: STABLE_5_4-branch
Diff to: previous 2.63: preferred, colored
Changes since revision 2.63: +3 -3 lines
Big copyright and version number update to prepare for 5.3.2 release.

Revision 2.63: download - view: text, markup, annotated - select for diffs
Fri Oct 14 08:53:08 2005 UTC (3 years, 1 month ago) by racke
Branches: MAIN
CVS tags: DEB_5_3_0_20051028_1
Diff to: previous 2.62: preferred, colored
Changes since revision 2.62: +6 -6 lines
date_blank widget: fixed wrong quoting

Revision 2.62: download - view: text, markup, annotated - select for diffs
Sun Aug 7 16:06:27 2005 UTC (3 years, 3 months ago) by mheins
Branches: MAIN
CVS tags: DEB_5_3_0_20051004_1
Diff to: previous 2.61: preferred, colored
Changes since revision 2.61: +13 -13 lines
* More XHTML patches thanks to Toni Mueller.

Revision 2.61: download - view: text, markup, annotated - select for diffs
Thu Jun 9 18:15:28 2005 UTC (3 years, 5 months ago) by docelic
Branches: MAIN
Diff to: previous 2.60: preferred, colored
Changes since revision 2.60: +30 -30 lines
- XHTML-compliance:

  - lowercased some HTML tags (all containers, so no ">" vs. "/>" issues)

  - removed double <small> tag ( <small><small>...text...</small></small> )

Revision 2.60: download - view: text, markup, annotated - select for diffs
Tue May 3 06:03:26 2005 UTC (3 years, 6 months ago) by mheins
Branches: MAIN
Diff to: previous 2.59: preferred, colored
Changes since revision 2.59: +11 -23 lines

* Implement new AccumulateCode and TagRepository directives. The rationale
  is:

    -- There is a huge base of Interchange code, much of which is not
       needed in even the standard catalog with full UI. This causes a
       larger memory profile than necessary.

    -- It is difficult to determine from the page code what code is
       needed, especially when a [tag] can call a $Tag can call
       a filter can call some sort of Action.

    -- A feature is needed to allow building catalogs with a more
       nearly optimal set of code than just "everything".

  If AccumulateCode is no, operation is exactly as before. There have
  been some code initialization changes and routine calling changes,
  but the data structures are identical and no difference in operation
  should be seen.

  If you set AccumulateCode to "Yes" and specify a TagRepository that
  contains all known UserTag, ActionMap, Filter, Widget, etc. etc.
  code, Interchange starts accumulating and compiling these as
  needed.

  The code is sent to the master process for compilation and
  incorporation, so that the next iteration of a page after HouseKeeping
  seconds will find the code already compiled and ready to go.

  It also copies the code file to the "code" (actually $Global::TagDir)
  directory in the "Accumulated" subdirectory tree. When you restart
  Interchange, these tags/filters/widgets/checks are read normally
  and need not be recompiled on the fly.

  Over time, as you access pages and routines, a full set of tags
  will be developed and you can turn AccumulateCode to "No".

* There can be failures due to calling a $Tag from within embedded
  Perl for the first time, particularly when it uses a MapRoutine or
  calls another $Tag within. This is due to Safe, and there is probably
  not much to be done about it. The good news is that the error should
  go away after HouseKeeping seconds when the tag gets compiled by the
  master.

  This could be avoided in the case of an AllowGlobal catalog, and it
  might be possible to make a directive that turns on AllowGlobal only
  when in AccumulateCode mode.

  The area, tmp, tmpn, and image tags are known to fail in this
  way in the standard catalog. Tags that are frequently called
  in this fashion should probably be placed in a "code/Vital"
  directory and not be accumulated.

* This is only recommended for development -- it might
  be possible to remove a tag/filter/etc. from the master
  and recompile these on the fly, but I haven't looked at that
  yet.

  Another nice feature is that you can easily add a tag simply
  by adding its code to the TagRepository and having it
  compiled.

* WARNING: Nice features are often dangerous! Don't run this in
  production -- you have been warned!

* WARNING: OrderCheck is not yet implemented, and a full audit has
  not been done on all compiled code directives.

* WARNING: Not fully tested in Prefork mode, and really not intended for
  that mode.

* WARNING: Including multiple tags in a file may have unpredictable
  behavior. You should try to keep related Alias and tag things in
  the same file.

* This feature only applies to Global code -- Catalog-based code
  shows no change.

* Passes the regression tests 100% when called with an empty "code"
  directory, compiling every tested tag and executing without error.

Revision 2.59: download - view: text, markup, annotated - select for diffs
Sat Apr 30 15:09:58 2005 UTC (3 years, 6 months ago) by mheins
Branches: MAIN
Diff to: previous 2.58: preferred, colored
Changes since revision 2.58: +5 -6 lines
* We had been running without warnings so long, we had gotten a bit sloppy
  in our code in some places.

  Because we do lots of uninitialized hash member stuff with arrays
  of fields and $opt, it is basically unreasonable for us to run with
  the "use of uninitialized variable" warnings. Because we do a fair
  amount of numerical comparisons on empty string values, it seemed
  unreasonable to run with "string value in numeric gt" enabled.

  Also, because Safe, HTML::Entities, and some other modules have
  these checks enabled, page code is bound to have warnings issued
  no matter what you do.

  It seems better to run with some warnings enabled so that we can
  catch bad code practice.

  So I have made the code run without warnings prior to and after
  interpolate_html(), and turned off warnings by default in the
  page code.

  If it is desirable to turn on warnings for pages, you can use
  [pragma perl_warnings_in_page] and see warnings for that page
  (or by default if you put in catalog.cfg).

* In general these changes are:

	 no warnings qw(uninitialized numeric);

  in most pages.

* Add $::Pragma->{perl_warnings_in_page}.

* Remove defined checks when simple set tests will do.

* Streamline some code.

Revision 2.58: download - view: text, markup, annotated - select for diffs
Thu Apr 28 01:54:44 2005 UTC (3 years, 6 months ago) by mheins
Branches: MAIN
Diff to: previous 2.57: preferred, colored
Changes since revision 2.57: +3 -3 lines

* Various variable initializations and tests to avoid warnings.

Revision 2.57: download - view: text, markup, annotated - select for diffs
Sat Apr 16 13:40:29 2005 UTC (3 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 2.56: preferred, colored
Changes since revision 2.56: +9 -3 lines
* Add nbsp=1 option to "links" widget.

* Prevent empty mv_arg from being passed in URL automatically.

* Add parser to handle links_nbsp.

Revision 2.56: download - view: text, markup, annotated - select for diffs
Sat Apr 16 13:08:18 2005 UTC (3 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 2.55: preferred, colored
Changes since revision 2.55: +2 -3 lines
Remove debug

Revision 2.55: download - view: text, markup, annotated - select for diffs
Sat Apr 16 12:40:47 2005 UTC (3 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 2.54: preferred, colored
Changes since revision 2.54: +3 -2 lines
* Just in case default widget is removed, provide default sub.

Revision 2.54: download - view: text, markup, annotated - select for diffs
Thu Apr 14 20:30:33 2005 UTC (3 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 2.53: preferred, colored
Changes since revision 2.53: +22 -35 lines
* Move all widgets out to code/Widget.

* Can specify multiple variants of widgets with something like:


	CodeDef movecombo Widget 1
	CodeDef movecombo Description Combo move
	CodeDef movecombo Help Selects any/all of many options, puts in text box
	CodeDef movecombo MapRoutine Vend::Form::movecombo
	CodeDef movecombo_replace Widget 1
	CodeDef movecombo_replace Description Combo move (one value)
	CodeDef movecombo_replace Help Selects one of many options, puts in text box

 Note the movecombo_replace variant has no Routine or MapRoutine.
 It is parsed by the internal parser to type of movecombo with
 option "replace".

 Ideally we would be able to have a parser associated with each
 type, specified outboard as well. I will work on this.

 The major effect of this is that you can put anywhere:

    CodeDef text_40 Widget 1
    CodeDef text_40 Description Text box, 40 columns

 This adds the entry to the widget type selector, but the parser
 still makes it a { type => 'text', width => 40 }.

* Change the meta editor so that it uses a movecombo_replace
  for the widget selector. This allows you to select a text
  widget, but add the "_40" on manually to allow easy widget
  specification.

* Add a movecombo_replace variant (i.e. { type => 'movecombo', replace => 1}
  which calls a different mode of addItem to only allow one value
  to be selected.

Revision 2.53: download - view: text, markup, annotated - select for diffs
Thu Apr 14 15:13:14 2005 UTC (3 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 2.52: preferred, colored
Changes since revision 2.52: +28 -7 lines
* Add Help capability to options generation. Uses Help member in
  CodeDef sections, and is automatically generated by codedef_options.

* For use in widgets without that, you need to generate the options
  as a reference and use that. (I will think about a mechanism
  to allow that in metadata.)

  Illustration with previously generated options:

	   [calc]
		  %opts = (
			['foo', 'Foo', 'This is the Foo selection help'],
			['bar', 'Bar', 'This is the Bar selection help'],
		  );
		  return;
	   [/calc]

		[display
			type=radio
			name=foobar
			options=`\%opts`
		] <br>

   Or inline:

		[display
			type=select
			name=foobar
			options=`[
				['foo', 'Foo', 'This is the other Foo selection help'],
				['bar', 'Bar', 'This is the other Bar selection help'],
			]`
		]

Revision 2.52: download - view: text, markup, annotated - select for diffs
Wed Apr 13 16:13:27 2005 UTC (3 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 2.51: preferred, colored
Changes since revision 2.51: +9 -9 lines
* Add Stefan's suggested Visibility modification for CodeDef options.
  By default the visibility is public.

  It wants something like:

  		codedef:JavaScriptCheck

  Will return all public Descriptions.

  		codedef:JavaScriptCheck:private         -- return public and private.
  		codedef:JavaScriptCheck:private,admin   -- return public,private,admin

  If Visibility is "with Foo::Bar", it checks to see if $Foo::Bar::VERSION
  is true and returns the option if it is.

* Create routine to automatically select Routine for certain type of
  CodeDef. Currently there are many separate methods of doing that.
  This one prefers local over global, and is called with:

  	   codedef_routine($type, $name);

  For instance, codedef_routine('OrderCheck', 'multistate') will
  return $Vend::Cfg->{CodeDef}{OrderCheck}{multistate} if it exists,
  otherwise returns $Global::CodeDef->{OrderCheck}{multistate}.

* Modify Form.pm to use this for JavaScriptCheck. More will be
  added.

* Modify filters to add private Visibility for non-mainstream filters.

* Modify meta editor to use this.

Revision 2.51: download - view: text, markup, annotated - select for diffs
Tue Apr 12 15:14:39 2005 UTC (3 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 2.50: preferred, colored
Changes since revision 2.50: +25 -19 lines
* Make the start of XHTML support for Interchange.

* Add global XHTML and catalog XHTML options. Global is false/off by
  default, and catalog option is defaulted from global option.

* The only effect is that Dispatch.pm sets $Vend::Xtrailer to the
  appropriate value of '/' or ''.

* Use $Vend::Xtrailer to set any <br/> or <br> we use.

* Change some generated HTML to:

	-- lowercase tags
	-- quote parms
	-- use $Vend::Xtrailer

* Supply [br] tag which returns the proper <br/> or <br>.

Revision 2.50: download - view: text, markup, annotated - select for diffs
Mon Apr 11 23:35:27 2005 UTC (3 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 2.49: preferred, colored
Changes since revision 2.49: +28 -8 lines
* Add JavaScriptCheck member of CodeDef family. Used to generate
  automatic Javascript-based field checks for [table-editor].

* Requires using the {prepend} member, so will not work with
  [display] unless you use a template.

Revision 2.49: download - view: text, markup, annotated - select for diffs
Mon Feb 14 06:37:10 2005 UTC (3 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.48: preferred, colored
Changes since revision 2.48: +3 -3 lines
Remove debug

Revision 2.48: download - view: text, markup, annotated - select for diffs
Sun Feb 13 06:48:30 2005 UTC (3 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.47: preferred, colored
Changes since revision 2.47: +58 -11 lines
* Fix problem with standard catalog and "date_time_ampm" widget
  definition, caused when "blank" handling was added.

* Modified freeform date widget parsing to operate more reliably.

* Added ability to have $opt->{start_hour} and $opt->{end_hour}
  for times, i.e.

  	[display type=datetime_ampm start-hour=8 end-hour=17]

	  or

	[display type="datetime_ampm_8-17"]

   (parsed and removed before adjust time so ok there, tested)

* Add $opt->{minutes} types:

	hourly -- Only even hour
	half   -- Even and half hour
	tens   -- every ten minutes
	n,n,n  -- The numbers mentioned (0,20,40 for example)

* Can all be added together:

	[display type="datetime ampm hourly 8-17 +1 blank"]

* Passes all regression tests, tested exhaustively with UI.

Revision 2.47: download - view: text, markup, annotated - select for diffs
Wed Jul 21 05:46:55 2004 UTC (4 years, 4 months ago) by mheins
Branches: MAIN
Diff to: previous 2.46: preferred, colored
Changes since revision 2.46: +3 -3 lines
* Add ExtraMeta capability to UserTags.

  If you put an ExtraMeta setting in the CodeDef for the widget, it
  works the same as a meta record of _widget::type, i.e. it is a structure
  like this one for the "imagedir" widget:

    CodeDef imagedir ExtraMeta <<EOM
    {
        _order => [ qw/ follow_symlinks / ],
        follow_symlinks => {
            widget => 'yesno',
            label => 'Follow Symlinks',
            help => 'Set to yes if you want to list all files, \
                    even following symbolic links',
        },
    }
    EOM

  This adds a "Special for imagedir widget" tab in the meta_editor,
  which allows special settings for the widget.

  Can be done in catalog.cfg widgets and global widgets. The actual
  ExtraMeta is a string value which is runtime-interpolated to a
  hash.

  Can be set in Vend::Form native widgets by setting %Vend::Form::ExtraMeta,
  i.e.:

      $Vend::Form::ExtraMeta{text} = {
        _order => [ 'maxlen' },
        maxlen => {
            widget => 'text_4',
            label => 'Maximum length for value',
        }
      };

  Not that it will do any good until the settings are honored by the
  widget. Should be set to an actual reference.

  There is an illustration for the "imagedir" widget as above.

* Add back in the nascent display_filter edit in meta_editor, and
  give help/setting for restrict_allow.

Revision 2.46: download - view: text, markup, annotated - select for diffs
Sun Jul 4 13:11:50 2004 UTC (4 years, 4 months ago) by racke
Branches: MAIN
Diff to: previous 2.45: preferred, colored
Changes since revision 2.45: +3 -3 lines
filter_value isn't imported in this context

Revision 2.45: download - view: text, markup, annotated - select for diffs
Wed Jun 9 17:16:55 2004 UTC (4 years, 5 months ago) by mheins
Branches: MAIN
Diff to: previous 2.44: preferred, colored
Changes since revision 2.44: +34 -14 lines
* Add code to allow control of class and style for date widget. Should
  probably be put in "select" type, too.

Revision 2.44: download - view: text, markup, annotated - select for diffs
Mon Jun 7 03:18:19 2004 UTC (4 years, 5 months ago) by mheins
Branches: MAIN
Diff to: previous 2.43: preferred, colored
Changes since revision 2.43: +10 -3 lines
* Make hidden_text widget honor display_filter attribute, which allows
  a listed value like a timestamp to be filtered for a human readable
  date display.

Revision 2.43: download - view: text, markup, annotated - select for diffs
Sun Feb 22 19:28:37 2004 UTC (4 years, 8 months ago) by mheins
Branches: MAIN
CVS tags: STABLE_5_2-root, STABLE_5_2-branch, REL_5_2_1, REL_5_2_0, REL_5_1_1, REL_5_1_0, DEB_5_2_1_1
Diff to: previous 2.42: preferred, colored
Changes since revision 2.42: +13 -2 lines
* Allow individual profile checks defined in metadata.

  It is defined in the "Help and Check" section of meta_editor.

  IMPORTANT: To enable these checks, the ui_profile part of the overall
  table definition has to be non-blank. You can just put a comment like

    # Enable individual form profile checks

  To enforce a profile on a field, set it's check value to a valid
  IC profile check. For example, to make sure the length of a field
  is between 4 and 10 characters, do:

  	  length 4-10

  Or to ensure it looks like a US or Canada postal code

  	  postcode

  This results in the following being set in the extended field
  of mv_metadata:

  	{ check => 'postcode' }

  If the check has an "=" sign anywhere, the field name is not
  prepended. So to do multiple checks, you need to do

  SECURITY:

  Since the filter or lookup check type can do data lookups and potentially
  call routines, we need to have some security. The table-editor tag
  sets the scratch value "mv_individual_profile" when a ui_profile
  is defined.

  WITHOUT TABLE EDITOR:

  To use this without the table editor, just set an mv_profile as
  normal. Then for each individual check, define in the form:

  	<input type=text name=foo value="">
  	<input type=hidden name=mv_individual_profile value="foo=length 1">

  That would check the form variable "foo" for a length of 1.

  This is automatically done by the [display ...] tag, so you can
  do:

  	[display type=text name=foo check="length 1"]

  to do the same thing.

  You will need to set the scratch value mv_individual_profile yourself
  to enable these.

  POSITIONING WITHIN PROFILE:

  The facility works by modifying the first mv_form_profile run and
  inserts its values either just before the first &fatal=yes or
  *after* the first &update=yes, whichever comes first. If neither
  are in the profile, they are put first in the profile.

  MULTIPLE CHECKS:

  If you have multiple mv_form_profile settings, the individual checks
  are only run as a part of the first one and are not repeated.

* Add blank_default metadata setting, which is the value a field should
  be initialized to (on display) if the current value has a length of 0.

* Remove extended.js_check from meta editor, as that was never implemented.

* Add some labels and help to meta editor.

Revision 2.39.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 11 21:32:50 2004 UTC (4 years, 9 months ago) by mheins
Branches: STABLE_5_0-branch
CVS tags: REL_5_0_2, REL_5_0_1
Diff to: previous 2.39: preferred, colored; next MAIN 2.40: preferred, colored
Changes since revision 2.39: +3 -3 lines
* Tolerate leading whitespace in query.

Revision 2.42: download - view: text, markup, annotated - select for diffs
Wed Feb 11 21:32:13 2004 UTC (4 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.41: preferred, colored
Changes since revision 2.41: +3 -3 lines
* Tolerate leading whitespace in query.

Revision 2.41: download - view: text, markup, annotated - select for diffs
Mon Feb 2 20:58:13 2004 UTC (4 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.40: preferred, colored
Changes since revision 2.40: +14 -2 lines

* Allow setting of a disabled.param=1 entry so that you can show
  widgets in a table editor yet not accept data from them. The DISABLED=1
  flag will be set in the widget (which normally grays it out) and
  it will be set to be display_only.

* Pass the form and form_name parameters to Vend::Form for use in
  widgets.

Revision 2.40: download - view: text, markup, annotated - select for diffs
Fri Jan 30 17:33:10 2004 UTC (4 years, 9 months ago) by racke
Branches: MAIN
Diff to: previous 2.39: preferred, colored
Changes since revision 2.39: +25 -10 lines
allow date_widget to display/store empty value if called as date_blank
datetime_blank etc.

Revision 2.39: download - view: text, markup, annotated - select for diffs
Sun Oct 5 16:25:58 2003 UTC (5 years, 1 month ago) by mheins
Branches: MAIN
CVS tags: STABLE_5_0-root, REL_5_0_0_RC2, REL_5_0_0_RC1, REL_5_0_0, REL_4_9_9, DEB_5_0_0_2, DEB_4_9_8_20031014_1, DEB_4_9_8_20031010_1
Branch point for: STABLE_5_0-branch
Diff to: previous 2.38: preferred, colored
Changes since revision 2.38: +9 -5 lines
* Don't HTML Entities encode the labels for a multi-option widget
  type if pre-filter=decode_entities. From a suggestion by Paul Vinciguerra.

Revision 2.38: download - view: text, markup, annotated - select for diffs
Wed Sep 24 05:39:02 2003 UTC (5 years, 1 month ago) by mheins
Branches: MAIN
Diff to: previous 2.37: preferred, colored
Changes since revision 2.37: +3 -3 lines
* Fix minor bug found by Paul Vinciguerra. Just the kind of thing usually
  found only by code read...

Revision 2.37: download - view: text, markup, annotated - select for diffs
Fri Jul 18 20:06:55 2003 UTC (5 years, 4 months ago) by jon
Branches: MAIN
CVS tags: DEB_4_9_8_20030911_1
Diff to: previous 2.36: preferred, colored
Changes since revision 2.36: +9 -3 lines
Add display type "labels" that is like "options" except it displays the
labels instead of their codes.

Revision 2.36: download - view: text, markup, annotated - select for diffs
Tue Jul 15 02:06:05 2003 UTC (5 years, 4 months ago) by jon
Branches: MAIN
Diff to: previous 2.35: preferred, colored
Changes since revision 2.35: +5 -3 lines
Two patches for lookup_query in mv_metadata:

* Substitute for placeholders in query (just like with prepend and append):

  _UI_TABLE_
  _UI_COLUMN_
  _UI_KEY_

  This allows foreign table lookup queries to be tailored for the record
  currently being edited in the table editor.

* Avoid internal server error if query fails.

Revision 2.35: download - view: text, markup, annotated - select for diffs
Thu Jul 3 23:12:56 2003 UTC (5 years, 4 months ago) by mheins
Branches: MAIN
CVS tags: DEB_4_9_8_20030706_1
Diff to: previous 2.34: preferred, colored
Changes since revision 2.34: +4 -4 lines
* Honor flag telling we already have data.

* Honor "db" passed parameter in lookup_query.

Revision 2.34: download - view: text, markup, annotated - select for diffs
Wed Jul 2 04:05:51 2003 UTC (5 years, 4 months ago) by mheins
Branches: MAIN
Diff to: previous 2.33: preferred, colored
Changes since revision 2.33: +8 -2 lines
* Fix several things with Table editor

	-- Modified passing of {table} parameter in display for table editor,
	   setting flag to prevent getting table data twice.

	-- Make lookup_query honor {db} parameter for selecting base table
	   for lookup

	-- Lookup should now work internally to the table if no {db} spec'd

	-- Sigh -- Mozilla screwed up their CSS size passing like MSIE, so
	   remove special things that made item editor/table editor automatically
	   look better on Mozilla (without setting *_height and *_width explicitly).

	-- Added MAXLENGTH to things you can set in meta_editor

	-- Added MAXLENGTH to parameters honored by [display ...]/Vend::Form,
	   without having to manipulate extra=" maxlength=22" stuff.

	-- Put hooks in for auto-JS checks in table editor / [display]

* Other

    -- Made default metadata (for merge) match foundation

Revision 2.33: download - view: text, markup, annotated - select for diffs
Wed Jun 18 17:34:44 2003 UTC (5 years, 5 months ago) by jon
Branches: MAIN
CVS tags: REL_4_9_8, DEB_4_9_8_2
Diff to: previous 2.32: preferred, colored
Changes since revision 2.32: +4 -3 lines
The great copyright, email address, URL, and version update.

Revision 2.32: download - view: text, markup, annotated - select for diffs
Wed Apr 23 20:54:39 2003 UTC (5 years, 6 months ago) by racke
Branches: MAIN
Diff to: previous 2.31: preferred, colored
Changes since revision 2.31: +3 -3 lines
fixed comparison

Revision 2.31: download - view: text, markup, annotated - select for diffs
Wed Apr 23 20:38:35 2003 UTC (5 years, 6 months ago) by racke
Branches: MAIN
Diff to: previous 2.30: preferred, colored
Changes since revision 2.30: +4 -2 lines
allow empty values to be SELECTED

Revision 2.30: download - view: text, markup, annotated - select for diffs
Thu Apr 10 17:38:14 2003 UTC (5 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 2.29: preferred, colored
Changes since revision 2.29: +17 -3 lines

* Allow merge of passed and looked-up options when lookup_merge
  parameter is set. This allows a lookup for values in the
  table *plus* an options line, without duplicated entries.

  First use is to display widget types in Options -- allows setting
  of entries like "radio_left_5" without losing them at edit, while
  still providing canned options.

Revision 2.29: download - view: text, markup, annotated - select for diffs
Sun Mar 30 22:05:20 2003 UTC (5 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 2.28: preferred, colored
Changes since revision 2.28: +15 -5 lines

* Allow multiple semi-colon-separated queries to populate options via
  lookup_query.

Revision 2.28: download - view: text, markup, annotated - select for diffs
Wed Mar 26 17:08:19 2003 UTC (5 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 2.27: preferred, colored
Changes since revision 2.27: +4 -4 lines
* Allow table conglomerations of checkboxes and radio boxes with more
  than 9 columns (i.e. radio_right_10).

  Thanks to Bill Carr for finding.

Revision 2.27: download - view: text, markup, annotated - select for diffs
Thu Mar 13 22:07:17 2003 UTC (5 years, 8 months ago) by jon
Branches: MAIN
Diff to: previous 2.26: preferred, colored
Changes since revision 2.26: +3 -3 lines
Remove extra closing HTML tag '>' character. Thanks to Bill Carr for
reporting this.

Revision 2.26: download - view: text, markup, annotated - select for diffs
Fri Mar 7 19:48:04 2003 UTC (5 years, 8 months ago) by mheins
Branches: MAIN
Diff to: previous 2.25: preferred, colored
Changes since revision 2.25: +11 -2 lines
* Add widget and filter to allow direct upload of a file to a database
  field. Useful for content/article bodies that you want to edit in a
  file but that are inconvenient to clip-past into a textarea.

  One new filter, "upload". Checks to see if the submitted variable
  is a file upload, if it is it reads the file and places it in the
  $CGI->{$varname}. Otherwise uses the value of the variable.

  One new widget, "filetext". This is an <input type=file> followed
  by a textarea. It shows the contents of the field in the textarea
  and you can edit it. If you want to replace it with a file upload,
  you just Browse to the file and upload it; it negates what is in
  the textarea. If no file is uploaded, the textarea pertains (I guess
  that statement is redundant).

  The type=filetext widget should always be used in combination with two
  filters, "nullselect upload".

Revision 2.25: download - view: text, markup, annotated - select for diffs
Sat Feb 8 20:08:11 2003 UTC (5 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.24: preferred, colored
Changes since revision 2.24: +34 -13 lines
* Allow templated options in select, radio, checkbox, etc. Enabled
  by passing option_template="ATTR Template".

  Uses same attr_list methodology as in most IC secondary templating.

  Active keys:

  	  LABEL           The normal label value
  	  VALUE           The normal value
	  PRICE           The formatted price, converted for locale
	  PRICE_NOFORMAT  The raw price data
	  ABSOLUTE        The formatted price, absolute (no negative)
	  NEGATIVE        Set true if price data is negative

  The default is equivalent to (though it doesn't use formatting):

  		{LABEL} {PRICE?}({PRICE}){/PRICE?}


  This example:

	{LABEL}
		{PRICE?}
			{NEGATIVE?}(subtract {ABSOLUTE}){/NEGATIVE?}
			{NEGATIVE:}(add {PRICE}){/NEGATIVE:}
		{/PRICE?}

	Would turn:

		Ebony handle ($20.00)
		Wood handle
		Plastic handle ($-5.00)

    into:

		Ebony handle (add $20.00)
		Wood handle
		Plastic handle (subtract $5.00)

Revision 2.24: download - view: text, markup, annotated - select for diffs
Sat Feb 1 21:45:16 2003 UTC (5 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.23: preferred, colored
Changes since revision 2.23: +3 -3 lines

* Fix "double March" bug in date widget.

Revision 2.23.2.1: download - view: text, markup, annotated - select for diffs
Sat Jan 25 22:21:27 2003 UTC (5 years, 9 months ago) by racke
Branches: LINUXIA
Diff to: previous 2.23: preferred, colored; next MAIN 2.24: preferred, colored
Changes since revision 2.23: +2 -2 lines
updated LINUXIA branch to 4.9 sources in order to use it as testbed again

Revision 2.23: download - view: text, markup, annotated - select for diffs
Thu Dec 12 03:18:57 2002 UTC (5 years, 11 months ago) by mheins
Branches: MAIN
CVS tags: REL_4_9_6, REL_4_9_5
Branch point for: LINUXIA
Diff to: previous 2.22: preferred, colored
Changes since revision 2.22: +22 -3 lines
* Add intrinsic "file" widget type.

* Allow setting of a widget class directly without using "extra".

Revision 2.22: download - view: text, markup, annotated - select for diffs
Thu Nov 14 19:24:53 2002 UTC (6 years ago) by mheins
Branches: MAIN
CVS tags: REL_4_9_4
Diff to: previous 2.21: preferred, colored
Changes since revision 2.21: +11 -4 lines
* Add conditional_text option for fillin_combo type (which supports a common
  survey question type). It only shows the input text if there is more than
  a one-letter/digit response to the question.

Revision 2.21: download - view: text, markup, annotated - select for diffs
Fri Nov 8 17:27:24 2002 UTC (6 years ago) by mheins
Branches: MAIN
Diff to: previous 2.20: preferred, colored
Changes since revision 2.20: +29 -4 lines
* Add new widget type, "fillin_combo", for surveys. (It is a very common
  survey question need to have "select one of the above or comment below".)

  Produces a select box with the options and provides a text input below
  (by default a textarea 2 rows 60 cols). Used in combination with the
  nullselect filter, and the "other" option should be a blank value.

Revision 2.20: download - view: text, markup, annotated - select for diffs
Wed Oct 30 17:39:06 2002 UTC (6 years ago) by mheins
Branches: MAIN
Diff to: previous 2.19: preferred, colored
Changes since revision 2.19: +10 -4 lines
* Change form hrefs for [table-editor] so that it does not generate
  "process" or "ui" by default. This will allow a URL restriction of
  $Config->{VendURL}/admin/ to be effective. TODO: Change the forms in
  pages/admin to not use [process].

  The methodology is to use mv_nextpage as the form action and set
  mv_action to the action, as well as mv_ui if the user is an admin.

* Add mv_ui CGI parameter to cause the 'ui' action to be performed
  prior to process. This allows ui handling while still using mv_action.
  To be debated -- setting mv_ui by default if $Vend::admin.

* Add handling of yesno_checkbox type so that you don't need to have
  two checkboxes with one/zero and "yes/no".

* Add "default_widget" option which allows setting the default widget
  for a field if none is specified.

* Fix {SEND} handling for nph output.

* Prevent insertion of $Variable->{MV_AUTOLOAD} on every interpolate_html.

* Allow extended handling of interpolation for append/prepend html
  if $opt->{restrict_allow} is set in the table editor.

Revision 2.19: download - view: text, markup, annotated - select for diffs
Mon Oct 14 20:05:33 2002 UTC (6 years, 1 month ago) by mheins
Branches: MAIN
Diff to: previous 2.18: preferred, colored
Changes since revision 2.18: +5 -3 lines
* Make option_format widget honor height.

Revision 2.18: download - view: text, markup, annotated - select for diffs
Thu Jun 27 22:24:10 2002 UTC (6 years, 4 months ago) by jon
Branches: MAIN
CVS tags: REL_4_9_2, REL_4_9_1
Diff to: previous 2.17: preferred, colored
Changes since revision 2.17: +3 -3 lines
Update Andrew Wilcox's email address at his request.

Revision 2.17: download - view: text, markup, annotated - select for diffs
Mon Jun 17 22:24:07 2002 UTC (6 years, 5 months ago) by jon
Branches: MAIN
Diff to: previous 2.16: preferred, colored
Changes since revision 2.16: +3 -3 lines
Big copyright date update. This will be the last time that Red Hat
copyright notices get updated en masse, since the bulk of new code will
very likely come from non-Red Hat employees.

Revision 2.16: download - view: text, markup, annotated - select for diffs
Tue Jun 11 01:15:49 2002 UTC (6 years, 5 months ago) by mheins
Branches: MAIN
Diff to: previous 2.15: preferred, colored
Changes since revision 2.15: +6 -6 lines
	* Change precedence of option source so that a lookup query
	  will override passed options

Revision 2.15: download - view: text, markup, annotated - select for diffs
Sat Feb 16 08:17:14 2002 UTC (6 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.14: preferred, colored
Changes since revision 2.14: +14 -16 lines
	Vend::Form
	* Change order of lookup queries in widgets so that they will
	  be used even when a key is provided in the record.

	Vend::Interpolate
	* Fix [PREFIX-on-match] (and no-match) to work more than once
	  with substitutions.

	* Add PREFIX-parent subtag to hash lists so you can access the
	  parent item $opt in a list.

Revision 2.14: download - view: text, markup, annotated - select for diffs
Sat Feb 9 03:16:05 2002 UTC (6 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.13: preferred, colored
Changes since revision 2.13: +3 -2 lines
	* Add option to allow ITL in form fields if needed.

Revision 2.13: download - view: text, markup, annotated - select for diffs
Fri Feb 8 23:08:21 2002 UTC (6 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.12: preferred, colored
Changes since revision 2.12: +17 -14 lines
	* Fired what I think is a major blow in the ongoing escaping problems.
	  Set up an ESCAPE_CHARS::std variable which encodes everything
	  HTML::Entities normally does plus [. This should be used almost
	  exclusively for encoding.

	* Fix encoding in most places it is done.

	* Fix a couple of default/override bugs in Vend/Form.pm at the
	  same time.

	* Add a "admin/test_code.html" page for testing short snippets
	  of ITL without having to create a test page.

	* Make the table populator JavaScript honor the db tables the
	  particular admin user is supposed to see.

Revision 2.12: download - view: text, markup, annotated - select for diffs
Thu Feb 7 21:33:21 2002 UTC (6 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.11: preferred, colored
Changes since revision 2.11: +7 -6 lines
	* Honor XML-style empty container tags.

			[set name="foo"/]

		is equivalent to

			[set name="foo"][/set]

	  If you are going to use this, you MUST name the parameters,
	  and you SHOULD quote them.

	  		[set foo /]         ---> Never works
	  		[set name=foo/]     ---> Does not work
	  		[set name=foo /]    ---> Works but not recommended
	  		[set name="foo" /]  ---> Recommended
	  		[set name="foo"/]   ---> OK

	  Benefits of this are removing a call to parse empty buffers,
	  and it should not add significant overhead.

	* Fix a couple of default setting problems in Form.pm.

Revision 2.11: download - view: text, markup, annotated - select for diffs
Tue Feb 5 08:33:08 2002 UTC (6 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.10: preferred, colored
Changes since revision 2.10: +3 -3 lines
	* Fix Vend::Form bug which caused a default "1" to show up in many
	  widgets.

	* Check for existence of record before runnin fatal $s->row() in
	  set_slice for DBM databases.

Revision 2.10: download - view: text, markup, annotated - select for diffs
Tue Feb 5 01:33:11 2002 UTC (6 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.9: preferred, colored
Changes since revision 2.9: +9 -5 lines
	* Fix problem with $Tag->display() called with null table, affecting
	  "wizard" mode.

	* Re-introduce "restrict" tag into Interchange, unintentionally
	  omitted when the great tag move was made.

	* Clean up of [sql ...] tag, which now becomes useful as a way
	  of doing [query list=1 ...].

	* Give proper encoding behavior to [display type=value ...]

	* Fix bad status code on PGP failure.

Revision 2.9: download - view: text, markup, annotated - select for diffs
Mon Feb 4 04:19:46 2002 UTC (6 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.8: preferred, colored
Changes since revision 2.8: +8 -4 lines
	* Recognize explicit "multiple" type.

Revision 2.8: download - view: text, markup, annotated - select for diffs
Mon Feb 4 01:31:17 2002 UTC (6 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.7: preferred, colored
Changes since revision 2.7: +8 -9 lines
	* Create Vend::CounterFile module and use it for counters. This
	  allows us to use/honor Fcntl lock settings and improve reliability
	  on shared sessions.

Revision 2.7: download - view: text, markup, annotated - select for diffs
Sun Feb 3 06:37:55 2002 UTC (6 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.6: preferred, colored
Changes since revision 2.6: +3 -3 lines

	* Bad template for movecombo caused failure of javascript move.

Revision 2.6: download - view: text, markup, annotated - select for diffs
Sun Feb 3 01:16:11 2002 UTC (6 years, 9 months ago) by kwalsh
Branches: MAIN
Diff to: previous 2.5: preferred, colored
Changes since revision 2.5: +3 -2 lines
The POSIX::strftime usage without a "use" was causing expireall to fail.

Revision 2.5: download - view: text, markup, annotated - select for diffs
Sat Feb 2 08:57:11 2002 UTC (6 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.4: preferred, colored
Changes since revision 2.4: +439 -178 lines
	* Continuing work on meta_display and Vend::Form.

	     --- Relocated date and option widgets
		 --- Prepared for breaking out image widgets to code/Widget
		 --- Fixed various bugs in widgets
		 --- Code simplification in Primitive.pm
		 --- Fix widget.coretag to not call UI::Primitive routine
		 --- Redo option_format filtering
	* Intermediate changes in page editor usertag support, preparing
	  to move to module

	* Improve alias_table code in interchange.PL

Revision 2.4: download - view: text, markup, annotated - select for diffs
Fri Feb 1 04:21:46 2002 UTC (6 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.3: preferred, colored
Changes since revision 2.3: +31 -5 lines

	* Make Vend::Form live. Now passes all known tests, and runs
	  accessories/widgets (apparently) flawlessly in foundation,
	  barry, simple, and the UI.

	* Remove tons of redundant code from Vend::Interpolate.

	* Add the first outboard system filter.

	* Change catalog.cfg to highlight etc/after.cfg.

	* Add a couple more regression tests for widgets.

	* More to come, UI::Primitive will soon be widget-free....

Revision 2.3: download - view: text, markup, annotated - select for diffs
Thu Jan 31 16:03:41 2002 UTC (6 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.2: preferred, colored
Changes since revision 2.2: +17 -5 lines
	* Changes to make [item-accessories ...] and [item-options ...] work on
	  flypage/loop as well as in cart.

	* Fix dropdown/select defaults applied with asterisk.

	* Fix price data insert for [item-options].

Revision 2.2: download - view: text, markup, annotated - select for diffs
Thu Jan 31 15:17:34 2002 UTC (6 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 2.1: preferred, colored
Changes since revision 2.1: +2 -0 lines
	* Fix behavior when $ishash, i.e., called from [item-accessories ...]
	  or [item-options], making those work in Vend::Form.

	* Fix include.coretag so that the $locale is not defined by default --
	  this was causing [L] ... [/L] to show up when called with positional
	  parameters. (Problem was using $_[1].)

Revision 2.1: download - view: text, markup, annotated - select for diffs
Thu Jan 31 14:58:41 2002 UTC (6 years, 9 months ago) by mheins
Branches: MAIN
	* Add new Vend::Form module which will get rid of the tag_accessories
	  gunk and replace UI::Primitive::meta_display eventually. Emulates
	  current widget set (mostly).

	* To test it out, define

		Variable  MV_DANGEROUS_NEW_FORM  1

	  in either catalog.cfg or interchange.cfg.

	* Todo:

		- add imagehelper/datetime/image
		- verify with [item-options ...] and [item-accessories ...]
		- add better lookup
		- Implement custom widgets with "CodeDef mywidget Widget"

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

Interchange CVSweb <info@icdevgroup.org>