From c596647a05d29ca82878b47dbc78112916c19950 Mon Sep 17 00:00:00 2001 From: jeff Date: Thu, 8 Feb 2007 01:39:01 +0000 Subject: [PATCH] add support from select-multiple --- Changes | 7 +++++++ META.yml | 2 +- SelectLayers.pm | 40 +++++++++++++++++++++++++++++----------- 3 files changed, 37 insertions(+), 12 deletions(-) diff --git a/Changes b/Changes index 677c656..9387d09 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,12 @@ Revision history for Perl extension HTML::Widgets::SelectLayers. +0.07 Wed Feb 07 05:33:00 PST 2007 + - Also overdue: add support for select-multiple + "form_elements" instead of the old form_* options. + - eliminate dubious fchanged javascript function + - check the type against undefined rather than the object itself + in copyelement + 0.06 Wed Dec 20 01:50:00 PST 2006 - Also long overdue: add auto-sensing of form field types, pass "form_elements" instead of the old form_* options. diff --git a/META.yml b/META.yml index 3bc1223..34ac425 100644 --- a/META.yml +++ b/META.yml @@ -1,7 +1,7 @@ # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: HTML-Widgets-SelectLayers -version: 0.06 +version: 0.07 version_from: SelectLayers.pm installdirs: site requires: diff --git a/SelectLayers.pm b/SelectLayers.pm index 63887c6..5444071 100644 --- a/SelectLayers.pm +++ b/SelectLayers.pm @@ -3,7 +3,7 @@ package HTML::Widgets::SelectLayers; use strict; use vars qw($VERSION); -$VERSION = '0.06'; +$VERSION = '0.07'; =head1 NAME @@ -93,9 +93,8 @@ form_action - Form action form_elements - (optional) Array reference of form fields to copy from the B form. Field type is autodetected; currently - text, hidden, checkbox, and select (single) fiels are - supported. Select (multiple) and radio fields are not yet - supported. + text, hidden, checkbox, and select fields are + supported. Radio fields are not yet supported. form_text - (optional) Array reference of text (or hidden) form fields to copy from the B form. @@ -106,8 +105,8 @@ form_checkbox - (optional) Array reference of checkbox form fields to copy from form_radio - (optional) Array reference of radio form fields to copy from the B form. -form_select - (optional) Array reference of select (not select multiple) form - fields to copy from the B form. +form_select - (optional) Array reference of select form fields to copy from + the B form. fixup_callback - (optional) subroutine reference, returns supplimentary JavaScript for the function described above under FORMS. @@ -184,7 +183,7 @@ END #form fields $html .= < +
END foreach my $f ( @$form_elements, @$form_text, @$form_checkbox, @$form_radio, @$form_select ) { @@ -239,11 +238,30 @@ sub _fixup {