From b6363ce0c3a6a9771447d07ed7f88ed3481f6222 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 10 Jul 2008 04:48:42 +0000 Subject: [PATCH] document how to add new tabs to getEditForm --- lib/WebGUI/Asset.pm | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index d2051de09..7336eff5c 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -848,6 +848,33 @@ Returns a list of arrayrefs, one per extra tab to add to the edit form. The default is no extra tabs. Override this in a subclass to add extra tabs. +Each array ref will have 3 fields: + +=over 4 + +=item tabName + +This is the name of the tab that you will use in the definition subroutine to +add fields to the new tab. + +=item label + +This should be an internationalized label that will be displayed on the tab. + +=item uiLevel + +This is the UI level for the tab. + +=back + +Please see the example below for adding 1 tab. + + sub getEditTabs { + my $self = shift; + my $i18n = WebGUI::International->new($self->session,"myNamespace"); + return (['myTab', $i18n->get('myTabName'), 9]); + } + =cut sub getEditTabs { @@ -859,7 +886,8 @@ sub getEditTabs { =head2 getEditForm () -Creates and returns a tabform to edit parameters of an Asset. +Creates and returns a tabform to edit parameters of an Asset. See L for +adding additional tabs. =cut