Moving edit screens to be template based for i18n (almost done with editor.

This commit is contained in:
Kaleb Murphy 2008-09-25 02:09:22 +00:00
parent e81accaa15
commit 38c7ee33c4
8 changed files with 142 additions and 153 deletions

View file

@ -54,7 +54,7 @@ sub update{
if(ref $$ref{ids} eq 'ARRAY' and $$ref{ids}->[0] ne 'NEW'){
$self->{sections}->[$$ref{ids}->[0]]->update($ref);
}else{
push(@{$self->{sections}}, WebGUI::Asset::Wobject::Survey::SectionJSON->new($self,$ref->{object}));
push(@{$self->{sections}}, WebGUI::Asset::Wobject::Survey::SectionJSON->new($ref->{object}));
}
}
#determine what to add and add it.
@ -77,16 +77,15 @@ sub createTemp{
return WebGUI::Asset::Wobject::Survey::SectionJSON->new($self);
}
}
sub freeze{
my $self = shift;
my ($self) = @_;
my %temp = %{$self};
$temp{sections} = [];
$temp{PPPPPPPOOOOOOOOOOOOOOOOPPPPPPPPPPPP} = 1;
delete $temp{log};
foreach (@{$self->{sections}}){
# push(@{$temp{sections}},$_->freeze());
push(@{$temp{sections}},$_->freeze());
}
$self->{log}->error(Dumper %temp);
return \%temp;
}
1;