adding generalized www_edit
This commit is contained in:
parent
fd212e9110
commit
5a81623352
1 changed files with 10 additions and 4 deletions
|
|
@ -568,10 +568,16 @@ sub setCollateral {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sub www_edit {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
my ($tag) = ($self->get("className") =~ /::(\w+)$/);
|
||||
$tag =~ s/([a-z])([A-Z])/$1 $2/g; #Separate studly caps
|
||||
$tag =~ s/([A-Z]+(?![a-z]))/$1 /g; #Separate acronyms
|
||||
$self->getAdminConsole->setHelp(lc($tag)." add/edit", "Asset_".$tag);
|
||||
my $addEdit = $session{form}{func} ? WebGUI::International::get('add','Wobject') : WebGUI::International::get('edit','Wobject');
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,$addEdit.' '.$self->getName);
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue