lots of help and other misc. fixes.
This commit is contained in:
parent
16da1e3180
commit
fc96c0bcfb
16 changed files with 476 additions and 597 deletions
|
|
@ -171,8 +171,7 @@ sub setUserPref {
|
|||
my $sql = "delete from wgFieldUserData where assetId=".quote($fieldId)." and userId=".quote($userId);
|
||||
WebGUI::SQL->write($sql);
|
||||
my $sql2 = "insert into wgFieldUserData values (".quote($fieldId).",".quote($userId).",".quote($valueToSet).")";
|
||||
# WebGUI::ErrorHandler::warn($sql2);
|
||||
$field->getParent->uncacheOverrides;
|
||||
$field->getParent->uncacheOverrides if ref $field->getParent eq 'WebGUI::Asset::Shortcut';
|
||||
return WebGUI::SQL->write($sql2);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -241,6 +241,12 @@ sub getEditForm {
|
|||
-hoverHelp=>WebGUI::International::get('1 description',"Asset_Shortcut"),
|
||||
-value=>'<a href="'.$self->getShortcut->getUrl.'">'.$self->getShortcut->get('title').'</a> ('.$self->getShortcut->getId.')'
|
||||
);
|
||||
$tabform->getTab("display")->template(
|
||||
-value=>$self->getValue("templateId"),
|
||||
-label=>WebGUI::International::get('shortcut template title', 'Asset_Shortcut'),
|
||||
-hoverHelp=>WebGUI::International::get('shortcut template title description', 'Asset_Shortcut'),
|
||||
-namespace=>"Shortcut"
|
||||
);
|
||||
if($session{setting}{metaDataEnabled}) {
|
||||
$tabform->getTab("properties")->yesNo(
|
||||
-name=>"shortcutByCriteria",
|
||||
|
|
@ -634,7 +640,7 @@ sub www_getUserPrefsForm {
|
|||
options=>$options,
|
||||
fieldType=>$fieldType
|
||||
};
|
||||
if ($fieldType eq 'Textarea') {
|
||||
if (lc($fieldType) eq 'textarea') {
|
||||
$params->{rows} = 4;
|
||||
$params->{columns} = 20;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -555,9 +555,10 @@ sub www_edit {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
my ($tag) = ($self->get("className") =~ /::(\w+)$/);
|
||||
my $tag2 = $tag;
|
||||
$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);
|
||||
$self->getAdminConsole->setHelp(lc($tag)." add/edit", "Asset_".$tag2);
|
||||
my $addEdit = ($session{form}{func} eq 'add') ? WebGUI::International::get('add','Wobject') : WebGUI::International::get('edit','Wobject');
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,$addEdit.' '.$self->getName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -447,19 +447,19 @@ sub www_displayStock {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
=head2 www_edit ( )
|
||||
#=head2 www_edit ( )
|
||||
|
||||
Web facing method which is the default edit page
|
||||
#Web facing method which is the default edit page
|
||||
|
||||
=cut
|
||||
#=cut
|
||||
|
||||
sub www_edit {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("stock_list_add_edit","Asset_StockData");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,
|
||||
WebGUI::International::get("edit_title","Asset_StockData"));
|
||||
}
|
||||
#sub www_edit {
|
||||
# my $self = shift;
|
||||
# return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
# $self->getAdminConsole->setHelp("stock list add/edit","Asset_StockData");
|
||||
# return $self->getAdminConsole->render($self->getEditForm->print,
|
||||
# WebGUI::International::get("edit_title","Asset_StockData"));
|
||||
#}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
=head2 www_view ( )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue