diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 98b87a300..97d047200 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -7,6 +7,8 @@ - Remaining i18n for Gallery templates - Fix: Search form now visible in Photo assets - Added hover help in Thingy's yui popups + - Thingy now shows all field types when editing a field + - Added an optionsSettable flag to form types that have an options property (Yung Han Khoe) - fixed: Editting matrix listings shows fields from other matrix assets - fixed: Matrix assets show pending listings from all matrix assets on a site - fixed: Changing name of Matrix listing leaves discussion forum with old name diff --git a/lib/WebGUI/Asset/Wobject/Thingy.pm b/lib/WebGUI/Asset/Wobject/Thingy.pm index 6075834ab..a1484b57c 100644 --- a/lib/WebGUI/Asset/Wobject/Thingy.pm +++ b/lib/WebGUI/Asset/Wobject/Thingy.pm @@ -1147,7 +1147,7 @@ sub www_editThing { if (defined $definition->[0]->{vertical}->{defaultValue}){ push(@hasVertical, $fieldType); } - if ($form->get("options")){ + if ($form->get("optionsSettable")){ push(@hasValues, $fieldType); } diff --git a/lib/WebGUI/Form/Combo.pm b/lib/WebGUI/Form/Combo.pm index f42651aec..9866748d4 100644 --- a/lib/WebGUI/Form/Combo.pm +++ b/lib/WebGUI/Form/Combo.pm @@ -55,6 +55,11 @@ The following additional parameters have been added via this sub class. Flag that tells the User Profile system that this is a valid form element in a User Profile +=head4 optionsSettable + +A boolean indicating whether the options are settable using an options hashref or not settable because this form +type generates its own options. + =cut sub definition { @@ -71,8 +76,11 @@ sub definition { }, dbDataType => { defaultValue => "TEXT", - }, - }); + }, + optionsSettable=>{ + defaultValue=>1 + }, + }); return $class->SUPER::definition($session, $definition); } diff --git a/lib/WebGUI/Form/ContentType.pm b/lib/WebGUI/Form/ContentType.pm index 6253a656c..b6ee2012d 100644 --- a/lib/WebGUI/Form/ContentType.pm +++ b/lib/WebGUI/Form/ContentType.pm @@ -58,6 +58,11 @@ An array reference of the items to be checked if no value is specified. Defaults A text label that will be displayed if toHtmlWithWrapper() is called. Defaults to getName(). +=head4 optionsSettable + +A boolean indicating whether the options are settable using an options hashref or not settable because this form +type generates its own options. + =cut sub definition { @@ -77,8 +82,11 @@ sub definition { }, defaultValue=>{ defaultValue=>"mixed", - } - }); + }, + optionsSettable=>{ + defaultValue=>0 + }, + }); return $class->SUPER::definition($session, $definition); } diff --git a/lib/WebGUI/Form/Country.pm b/lib/WebGUI/Form/Country.pm index cb60ec5b7..2c278e23e 100644 --- a/lib/WebGUI/Form/Country.pm +++ b/lib/WebGUI/Form/Country.pm @@ -51,6 +51,11 @@ The following additional parameters have been added via this sub class. The identifier for this field. Defaults to "country". +=head4 optionsSettable + +A boolean indicating whether the options are settable using an options hashref or not settable because this form +type generates its own options. + =cut sub definition { @@ -71,7 +76,10 @@ sub definition { defaultValue=>{ defaultValue=>"United States" }, - }); + optionsSettable=>{ + defaultValue=>0 + }, + }); return $class->SUPER::definition($session, $definition); } diff --git a/lib/WebGUI/Form/DatabaseLink.pm b/lib/WebGUI/Form/DatabaseLink.pm index b5ae0563b..84f61b828 100644 --- a/lib/WebGUI/Form/DatabaseLink.pm +++ b/lib/WebGUI/Form/DatabaseLink.pm @@ -67,6 +67,11 @@ A tooltip to tell the user what to do with the field. Defaults a standard piece A text label that will be displayed if toHtmlWithWrapper() is called. Defaults to getName(). +=head4 optionsSettable + +A boolean indicating whether the options are settable using an options hashref or not settable because this form +type generates its own options. + =cut sub definition { @@ -95,8 +100,11 @@ sub definition { }, dbDataType => { defaultValue => "VARCHAR(22) BINARY", - }, - }); + }, + optionsSettable=>{ + defaultValue=>0 + }, + }); return $class->SUPER::definition($session, $definition); } diff --git a/lib/WebGUI/Form/FieldType.pm b/lib/WebGUI/Form/FieldType.pm index 4c48460c9..80c945726 100644 --- a/lib/WebGUI/Form/FieldType.pm +++ b/lib/WebGUI/Form/FieldType.pm @@ -56,6 +56,11 @@ An array reference containing the form control types to be selectable. Defaults A text label that will be displayed if toHtmlWithWrapper() is called. Defaults to getName(). +=head4 optionsSettable + +A boolean indicating whether the options are settable using an options hashref or not settable because this form +type generates its own options. + =cut sub definition { @@ -72,8 +77,11 @@ sub definition { }, types=>{ defaultValue=>$class->getTypes($session) - } - }); + }, + optionsSettable=>{ + defaultValue=>0 + }, + }); return $class->SUPER::definition($session, $definition); } diff --git a/lib/WebGUI/Form/FilterContent.pm b/lib/WebGUI/Form/FilterContent.pm index baa90d6b1..939d171e6 100644 --- a/lib/WebGUI/Form/FilterContent.pm +++ b/lib/WebGUI/Form/FilterContent.pm @@ -59,6 +59,11 @@ Defaults to "most". Possible values are "none", "macros", "javascript", "most" a A tooltip for what to do with this field. Defaults to a general explaination of content filters. +=head4 optionsSettable + +A boolean indicating whether the options are settable using an options hashref or not settable because this form +type generates its own options. + =cut sub definition { @@ -81,8 +86,11 @@ sub definition { }, dbDataType => { defaultValue => "VARCHAR(16)", - }, - }); + }, + optionsSettable=>{ + defaultValue=>0 + }, + }); return $class->SUPER::definition($session, $definition); } diff --git a/lib/WebGUI/Form/Group.pm b/lib/WebGUI/Form/Group.pm index d4bbb0331..db9a10e54 100644 --- a/lib/WebGUI/Form/Group.pm +++ b/lib/WebGUI/Form/Group.pm @@ -67,6 +67,11 @@ This will be used if no value is specified. Should be passed as an array referen Flag that tells the User Profile system that this is a valid form element in a User Profile +=head4 optionsSettable + +A boolean indicating whether the options are settable using an options hashref or not settable because this form +type generates its own options. + =cut sub definition { @@ -95,8 +100,11 @@ sub definition { }, dbDataType => { defaultValue => "VARCHAR(22) BINARY", - }, - }); + }, + optionsSettable=>{ + defaultValue=>0 + }, + }); return $class->SUPER::definition($session, $definition); } diff --git a/lib/WebGUI/Form/LdapLink.pm b/lib/WebGUI/Form/LdapLink.pm index f444a13cb..b009de2dd 100644 --- a/lib/WebGUI/Form/LdapLink.pm +++ b/lib/WebGUI/Form/LdapLink.pm @@ -71,6 +71,11 @@ A URL that will be acted upon after editing an LDAP link. A text label that will be displayed if toHtmlWithWrapper() is called. Defaults to getName(). +=head4 optionsSettable + +A boolean indicating whether the options are settable using an options hashref or not settable because this form +type generates its own options. + =cut sub definition { @@ -102,8 +107,11 @@ sub definition { }, dbDataType => { defaultValue => "TEXT", - }, - }); + }, + optionsSettable=>{ + defaultValue=>0 + }, + }); return $class->SUPER::definition($session, $definition); } diff --git a/lib/WebGUI/Form/List.pm b/lib/WebGUI/Form/List.pm index 86d789040..909c776cb 100644 --- a/lib/WebGUI/Form/List.pm +++ b/lib/WebGUI/Form/List.pm @@ -122,6 +122,11 @@ The following additional parameters have been added via this sub class. A hash reference containing key values that will be returned with the form post and displayable text pairs. Defaults to an empty hash reference. +=head4 optionsSettable + +A boolean indicating whether the options are settable using an options hashref or not settable because this form +type generates its own options. + =head4 defaultValue An array reference of the items to be checked if no value is specified. Defaults to an empty array reference. @@ -156,7 +161,10 @@ sub definition { options=>{ defaultValue=>{} }, - defaultValue=>{ + optionsSettable=>{ + defaultValue=>1 + }, + defaultValue=>{ defaultValue=>[], }, multiple=>{ diff --git a/lib/WebGUI/Form/SelectRichEditor.pm b/lib/WebGUI/Form/SelectRichEditor.pm index aa57f221f..4d0d3e7ec 100644 --- a/lib/WebGUI/Form/SelectRichEditor.pm +++ b/lib/WebGUI/Form/SelectRichEditor.pm @@ -51,6 +51,11 @@ The following additional parameters have been added via this sub class. Defaults to the Post Rich Editor, the least-featured Rich Text Editor and the one most likely to be selected by users of this form control. +=head4 optionsSettable + +A boolean indicating whether the options are settable using an options hashref or not settable because this form +type generates its own options. + =cut sub definition { @@ -65,7 +70,10 @@ sub definition { defaultValue => { defaultValue => '', }, - }; + optionsSettable=>{ + defaultValue =>0 + }, + }; return $class->SUPER::definition($session, $definition); } diff --git a/lib/WebGUI/Form/Template.pm b/lib/WebGUI/Form/Template.pm index 02db443d9..b6f547ddb 100644 --- a/lib/WebGUI/Form/Template.pm +++ b/lib/WebGUI/Form/Template.pm @@ -63,6 +63,11 @@ A text label that will be displayed if toHtmlWithWrapper() is called. Defaults t If true, this will limit the list of template to only include templates that are committed. +=head4 optionsSettable + +A boolean indicating whether the options are settable using an options hashref or not settable because this form +type generates its own options. + =cut sub definition { @@ -88,8 +93,11 @@ sub definition { }, dbDataType => { defaultValue => "VARCHAR(22) BINARY", - }, - }); + }, + optionsSettable=>{ + defaultValue=>0 + }, + }); return $class->SUPER::definition($session, $definition); } diff --git a/lib/WebGUI/Form/TimeZone.pm b/lib/WebGUI/Form/TimeZone.pm index 2e9a160ef..5743d8f3e 100644 --- a/lib/WebGUI/Form/TimeZone.pm +++ b/lib/WebGUI/Form/TimeZone.pm @@ -42,6 +42,11 @@ The following methods are specifically available from this class. Check the supe See the super class for additional details. +=head4 optionsSettable + +A boolean indicating whether the options are settable using an options hashref or not settable because this form +type generates its own options. + =cut sub definition { @@ -56,8 +61,11 @@ sub definition { value=>{ defaultValue=>undef }, - }); - return $class->SUPER::definition($session, $definition); + optionsSettable=>{ + defaultValue=>0 + }, + }); + return $class->SUPER::definition($session, $definition); } #------------------------------------------------------------------- diff --git a/lib/WebGUI/Form/Workflow.pm b/lib/WebGUI/Form/Workflow.pm index 7aec8649b..7ce3b7fc3 100644 --- a/lib/WebGUI/Form/Workflow.pm +++ b/lib/WebGUI/Form/Workflow.pm @@ -68,6 +68,11 @@ If set to 1 then a "None" option will appear in the list of workflows, which wil Most workflow triggers can't handle realtime workflows, so we leave out realtime workflows unless they should specifically be included. +=head4 optionsSettable + +A boolean indicating whether the options are settable using an options hashref or not settable because this form +type generates its own options. + =cut sub definition { @@ -96,9 +101,12 @@ sub definition { }, dbDataType => { defaultValue => "VARCHAR(22) BINARY", - }, - }); - return $class->SUPER::definition($session, $definition); + }, + optionsSettable=>{ + defaultValue=>0 + }, + }); + return $class->SUPER::definition($session, $definition); } #-------------------------------------------------------------------