Added an optionsSettable flag to form types that have an options property
This commit is contained in:
parent
3ea9420479
commit
e862cb8303
15 changed files with 131 additions and 25 deletions
|
|
@ -7,6 +7,8 @@
|
||||||
- Remaining i18n for Gallery templates
|
- Remaining i18n for Gallery templates
|
||||||
- Fix: Search form now visible in Photo assets
|
- Fix: Search form now visible in Photo assets
|
||||||
- Added hover help in Thingy's yui popups
|
- 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: Editting matrix listings shows fields from other matrix assets
|
||||||
- fixed: Matrix assets show pending listings from all matrix assets on a site
|
- 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
|
- fixed: Changing name of Matrix listing leaves discussion forum with old name
|
||||||
|
|
|
||||||
|
|
@ -1147,7 +1147,7 @@ sub www_editThing {
|
||||||
if (defined $definition->[0]->{vertical}->{defaultValue}){
|
if (defined $definition->[0]->{vertical}->{defaultValue}){
|
||||||
push(@hasVertical, $fieldType);
|
push(@hasVertical, $fieldType);
|
||||||
}
|
}
|
||||||
if ($form->get("options")){
|
if ($form->get("optionsSettable")){
|
||||||
push(@hasValues, $fieldType);
|
push(@hasValues, $fieldType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
|
|
@ -71,8 +76,11 @@ sub definition {
|
||||||
},
|
},
|
||||||
dbDataType => {
|
dbDataType => {
|
||||||
defaultValue => "TEXT",
|
defaultValue => "TEXT",
|
||||||
},
|
},
|
||||||
});
|
optionsSettable=>{
|
||||||
|
defaultValue=>1
|
||||||
|
},
|
||||||
|
});
|
||||||
return $class->SUPER::definition($session, $definition);
|
return $class->SUPER::definition($session, $definition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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().
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
|
|
@ -77,8 +82,11 @@ sub definition {
|
||||||
},
|
},
|
||||||
defaultValue=>{
|
defaultValue=>{
|
||||||
defaultValue=>"mixed",
|
defaultValue=>"mixed",
|
||||||
}
|
},
|
||||||
});
|
optionsSettable=>{
|
||||||
|
defaultValue=>0
|
||||||
|
},
|
||||||
|
});
|
||||||
return $class->SUPER::definition($session, $definition);
|
return $class->SUPER::definition($session, $definition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,11 @@ The following additional parameters have been added via this sub class.
|
||||||
|
|
||||||
The identifier for this field. Defaults to "country".
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
|
|
@ -71,7 +76,10 @@ sub definition {
|
||||||
defaultValue=>{
|
defaultValue=>{
|
||||||
defaultValue=>"United States"
|
defaultValue=>"United States"
|
||||||
},
|
},
|
||||||
});
|
optionsSettable=>{
|
||||||
|
defaultValue=>0
|
||||||
|
},
|
||||||
|
});
|
||||||
return $class->SUPER::definition($session, $definition);
|
return $class->SUPER::definition($session, $definition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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().
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
|
|
@ -95,8 +100,11 @@ sub definition {
|
||||||
},
|
},
|
||||||
dbDataType => {
|
dbDataType => {
|
||||||
defaultValue => "VARCHAR(22) BINARY",
|
defaultValue => "VARCHAR(22) BINARY",
|
||||||
},
|
},
|
||||||
});
|
optionsSettable=>{
|
||||||
|
defaultValue=>0
|
||||||
|
},
|
||||||
|
});
|
||||||
return $class->SUPER::definition($session, $definition);
|
return $class->SUPER::definition($session, $definition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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().
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
|
|
@ -72,8 +77,11 @@ sub definition {
|
||||||
},
|
},
|
||||||
types=>{
|
types=>{
|
||||||
defaultValue=>$class->getTypes($session)
|
defaultValue=>$class->getTypes($session)
|
||||||
}
|
},
|
||||||
});
|
optionsSettable=>{
|
||||||
|
defaultValue=>0
|
||||||
|
},
|
||||||
|
});
|
||||||
return $class->SUPER::definition($session, $definition);
|
return $class->SUPER::definition($session, $definition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
|
|
@ -81,8 +86,11 @@ sub definition {
|
||||||
},
|
},
|
||||||
dbDataType => {
|
dbDataType => {
|
||||||
defaultValue => "VARCHAR(16)",
|
defaultValue => "VARCHAR(16)",
|
||||||
},
|
},
|
||||||
});
|
optionsSettable=>{
|
||||||
|
defaultValue=>0
|
||||||
|
},
|
||||||
|
});
|
||||||
return $class->SUPER::definition($session, $definition);
|
return $class->SUPER::definition($session, $definition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
|
|
@ -95,8 +100,11 @@ sub definition {
|
||||||
},
|
},
|
||||||
dbDataType => {
|
dbDataType => {
|
||||||
defaultValue => "VARCHAR(22) BINARY",
|
defaultValue => "VARCHAR(22) BINARY",
|
||||||
},
|
},
|
||||||
});
|
optionsSettable=>{
|
||||||
|
defaultValue=>0
|
||||||
|
},
|
||||||
|
});
|
||||||
return $class->SUPER::definition($session, $definition);
|
return $class->SUPER::definition($session, $definition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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().
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
|
|
@ -102,8 +107,11 @@ sub definition {
|
||||||
},
|
},
|
||||||
dbDataType => {
|
dbDataType => {
|
||||||
defaultValue => "TEXT",
|
defaultValue => "TEXT",
|
||||||
},
|
},
|
||||||
});
|
optionsSettable=>{
|
||||||
|
defaultValue=>0
|
||||||
|
},
|
||||||
|
});
|
||||||
return $class->SUPER::definition($session, $definition);
|
return $class->SUPER::definition($session, $definition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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
|
=head4 defaultValue
|
||||||
|
|
||||||
An array reference of the items to be checked if no value is specified. Defaults to an empty array reference.
|
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=>{
|
options=>{
|
||||||
defaultValue=>{}
|
defaultValue=>{}
|
||||||
},
|
},
|
||||||
defaultValue=>{
|
optionsSettable=>{
|
||||||
|
defaultValue=>1
|
||||||
|
},
|
||||||
|
defaultValue=>{
|
||||||
defaultValue=>[],
|
defaultValue=>[],
|
||||||
},
|
},
|
||||||
multiple=>{
|
multiple=>{
|
||||||
|
|
|
||||||
|
|
@ -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
|
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.
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
|
|
@ -65,7 +70,10 @@ sub definition {
|
||||||
defaultValue => {
|
defaultValue => {
|
||||||
defaultValue => '',
|
defaultValue => '',
|
||||||
},
|
},
|
||||||
};
|
optionsSettable=>{
|
||||||
|
defaultValue =>0
|
||||||
|
},
|
||||||
|
};
|
||||||
return $class->SUPER::definition($session, $definition);
|
return $class->SUPER::definition($session, $definition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
|
|
@ -88,8 +93,11 @@ sub definition {
|
||||||
},
|
},
|
||||||
dbDataType => {
|
dbDataType => {
|
||||||
defaultValue => "VARCHAR(22) BINARY",
|
defaultValue => "VARCHAR(22) BINARY",
|
||||||
},
|
},
|
||||||
});
|
optionsSettable=>{
|
||||||
|
defaultValue=>0
|
||||||
|
},
|
||||||
|
});
|
||||||
return $class->SUPER::definition($session, $definition);
|
return $class->SUPER::definition($session, $definition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,11 @@ The following methods are specifically available from this class. Check the supe
|
||||||
|
|
||||||
See the super class for additional details.
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
|
|
@ -56,8 +61,11 @@ sub definition {
|
||||||
value=>{
|
value=>{
|
||||||
defaultValue=>undef
|
defaultValue=>undef
|
||||||
},
|
},
|
||||||
});
|
optionsSettable=>{
|
||||||
return $class->SUPER::definition($session, $definition);
|
defaultValue=>0
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return $class->SUPER::definition($session, $definition);
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -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
|
Most workflow triggers can't handle realtime workflows, so we leave out realtime workflows unless they should
|
||||||
specifically be included.
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
|
|
@ -96,9 +101,12 @@ sub definition {
|
||||||
},
|
},
|
||||||
dbDataType => {
|
dbDataType => {
|
||||||
defaultValue => "VARCHAR(22) BINARY",
|
defaultValue => "VARCHAR(22) BINARY",
|
||||||
},
|
},
|
||||||
});
|
optionsSettable=>{
|
||||||
return $class->SUPER::definition($session, $definition);
|
defaultValue=>0
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return $class->SUPER::definition($session, $definition);
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue