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
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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=>{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue