fix [ 1266159 ] 6.7.1 - getEditForm fields are in funky order
This commit is contained in:
parent
1a841c60f9
commit
d6afcde7b9
5 changed files with 49 additions and 35 deletions
|
|
@ -66,11 +66,9 @@ An array of hashes to prepend to the list
|
|||
sub definition {
|
||||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
tableName=>'wobject',
|
||||
className=>'WebGUI::Asset::Wobject',
|
||||
autoGenerateForms=>1,
|
||||
properties=>{
|
||||
my %properties;
|
||||
tie %properties, 'Tie::IxHash';
|
||||
%properties = (
|
||||
description=>{
|
||||
fieldType=>'HTMLArea',
|
||||
defaultValue=>undef,
|
||||
|
|
@ -118,7 +116,12 @@ sub definition {
|
|||
hoverHelp=>WebGUI::International::get('1079 description','Wobject'),
|
||||
namespace=>'style'
|
||||
}
|
||||
}
|
||||
);
|
||||
push(@{$definition}, {
|
||||
tableName=>'wobject',
|
||||
className=>'WebGUI::Asset::Wobject',
|
||||
autoGenerateForms=>1,
|
||||
properties => \%properties
|
||||
});
|
||||
return $class->SUPER::definition($definition);
|
||||
}
|
||||
|
|
@ -247,7 +250,7 @@ Returns the TabForm object that will be used in generating the edit page for thi
|
|||
sub getEditForm {
|
||||
my $self = shift;
|
||||
my $tabform = $self->SUPER::getEditForm();
|
||||
foreach my $definition (@{$self->definition}) {
|
||||
foreach my $definition (reverse @{$self->definition}) {
|
||||
my $properties = $definition->{properties};
|
||||
next unless ($definition->{autoGenerateForms});
|
||||
foreach my $fieldname (keys %{$properties}) {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ package WebGUI::Asset::Wobject::Article;
|
|||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use Tie::IxHash;
|
||||
use WebGUI::DateTime;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Paginator;
|
||||
|
|
@ -25,13 +26,9 @@ our @ISA = qw(WebGUI::Asset::Wobject);
|
|||
sub definition {
|
||||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get(1,"Asset_Article"),
|
||||
icon=>'article.gif',
|
||||
autoGenerateForms=>1,
|
||||
tableName=>'Article',
|
||||
className=>'WebGUI::Asset::Wobject::Article',
|
||||
properties=>{
|
||||
my %properties;
|
||||
tie %properties, 'Tie::IxHash';
|
||||
%properties = (
|
||||
templateId =>{
|
||||
fieldType=>"template",
|
||||
defaultValue=>'PBtmpl0000000000000002',
|
||||
|
|
@ -65,7 +62,14 @@ sub definition {
|
|||
hoverHelp=>WebGUI::International::get('carriage return description','Asset_Article'),
|
||||
uiLevel=>5
|
||||
}
|
||||
}
|
||||
);
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get(1,"Asset_Article"),
|
||||
icon=>'article.gif',
|
||||
autoGenerateForms=>1,
|
||||
tableName=>'Article',
|
||||
className=>'WebGUI::Asset::Wobject::Article',
|
||||
properties=>\%properties
|
||||
});
|
||||
return $class->SUPER::definition($definition);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ package WebGUI::Asset::Wobject::MessageBoard;
|
|||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use Tie::IxHash;
|
||||
use WebGUI::Asset::Wobject;
|
||||
use WebGUI::DateTime;
|
||||
use WebGUI::International;
|
||||
|
|
@ -25,13 +26,9 @@ our @ISA = qw(WebGUI::Asset::Wobject);
|
|||
sub definition {
|
||||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get(2,"Asset_MessageBoard"),
|
||||
icon=>'messageBoard.gif',
|
||||
tableName=>'MessageBoard',
|
||||
className=>'WebGUI::Asset::Wobject::MessageBoard',
|
||||
autoGenerateForms=>1,
|
||||
properties=>{
|
||||
my %properties;
|
||||
tie %properties, 'Tie::IxHash';
|
||||
%properties = (
|
||||
templateId =>{
|
||||
tab=>"display",
|
||||
fieldType=>"template",
|
||||
|
|
@ -39,8 +36,15 @@ sub definition {
|
|||
namespace=>"MessageBoard",
|
||||
label=>WebGUI::International::get(73,"Asset_MessageBoard"),
|
||||
hoverHelp=>WebGUI::International::get('73 description',"Asset_MessageBoard")
|
||||
},
|
||||
}
|
||||
}
|
||||
);
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get(2,"Asset_MessageBoard"),
|
||||
icon=>'messageBoard.gif',
|
||||
tableName=>'MessageBoard',
|
||||
className=>'WebGUI::Asset::Wobject::MessageBoard',
|
||||
autoGenerateForms=>1,
|
||||
properties=>\%properties
|
||||
});
|
||||
return $class->SUPER::definition($definition);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ use HTML::Entities;
|
|||
use strict;
|
||||
use Storable;
|
||||
use Tie::CPHash;
|
||||
use Tie::IxHash;
|
||||
use WebGUI::Cache;
|
||||
use WebGUI::DateTime;
|
||||
use WebGUI::HTMLForm;
|
||||
|
|
@ -67,19 +68,12 @@ A hash reference passed in from a subclass definition.
|
|||
|
||||
=cut
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub definition {
|
||||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get(2,'Asset_SyndicatedContent'),
|
||||
uiLevel=>6,
|
||||
autoGenerateForms=>1,
|
||||
icon=>'syndicatedContent.gif',
|
||||
tableName=>'SyndicatedContent',
|
||||
className=>'WebGUI::Asset::Wobject::SyndicatedContent',
|
||||
properties=>{
|
||||
my %properties;
|
||||
tie %properties, 'Tie::IxHash';
|
||||
%properties = (
|
||||
templateId =>{
|
||||
tab=>"display",
|
||||
fieldType=>'template',
|
||||
|
|
@ -123,7 +117,15 @@ sub definition {
|
|||
hoverHelp=>WebGUI::International::get('hasTermsLabel description','Asset_SyndicatedContent'),
|
||||
maxlength=>255
|
||||
}
|
||||
}
|
||||
);
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get(2,'Asset_SyndicatedContent'),
|
||||
uiLevel=>6,
|
||||
autoGenerateForms=>1,
|
||||
icon=>'syndicatedContent.gif',
|
||||
tableName=>'SyndicatedContent',
|
||||
className=>'WebGUI::Asset::Wobject::SyndicatedContent',
|
||||
properties=>%properties
|
||||
});
|
||||
return $class->SUPER::definition($definition);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue