Added a "Cancel" button to each tab form
This commit is contained in:
parent
ab6e7c67ef
commit
a189f52942
3 changed files with 14 additions and 3 deletions
|
|
@ -12,6 +12,7 @@
|
|||
- Bugfix [ 1055396 ] Template switching issue (Len Kranendonk)
|
||||
- WebGUI Operations are now dynamically loaded (Len Kranendonk)
|
||||
- Added <input type="button"> button to Form.pm / HTMLForm.pm (Len Kranendonk)
|
||||
- Added a "Cancel" button to each tab form (Len Kranendonk)
|
||||
|
||||
6.2.7
|
||||
- Expanded upon the help for URL extensions.
|
||||
|
|
|
|||
|
|
@ -151,14 +151,18 @@ A string containing the link to the tab-CascadingStyleSheet
|
|||
=cut
|
||||
|
||||
sub new {
|
||||
my ($class, $tabs, $css);
|
||||
my ($cancel, $class, $tabs, $css);
|
||||
$class = $_[0];
|
||||
$tabs = $_[1];
|
||||
$css = $_[2] || $session{config}{extrasURL}.'/tabs/tabs.css';
|
||||
foreach my $key (keys %{$tabs}) {
|
||||
$tabs->{$key}{form} = WebGUI::HTMLForm->new;
|
||||
}
|
||||
bless { _submit=>WebGUI::Form::submit(), _form=>WebGUI::Form::formHeader(), _hidden=>"", _tab=>$tabs, _css=>$css }, $class;
|
||||
$cancel = WebGUI::Form::button({
|
||||
value=>WebGUI::International::get('cancel'),
|
||||
extras=>q|onClick="location.href='|.WebGUI::URL::page().q|'"|
|
||||
});
|
||||
bless { _cancel=>$cancel, _submit=>WebGUI::Form::submit(), _form=>WebGUI::Form::formHeader(), _hidden=>"", _tab=>$tabs, _css=>$css }, $class;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -191,7 +195,7 @@ sub print {
|
|||
$form .= '</table></div>';
|
||||
$i++;
|
||||
}
|
||||
$output .= '<div class="tabs">'.$tabs.$_[0]->{_submit}.'</div>';
|
||||
$output .= '<div class="tabs">'.$tabs.$_[0]->{_submit}." ".$_[0]->{_cancel}.'</div>';
|
||||
$output .= $form;
|
||||
$output .= WebGUI::Form::formFooter();
|
||||
$output .= '<script>var numberOfTabs = '.($i-1).'; initTabs();</script>';
|
||||
|
|
|
|||
|
|
@ -7467,6 +7467,12 @@ config file.</p>
|
|||
lastUpdated =>1092930637,
|
||||
context => q|help body forum post preview template|
|
||||
},
|
||||
'cancel' => {
|
||||
message => q|cancel|,
|
||||
lastUpdated =>1092930637,
|
||||
context => q|Label of the cancel button|
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue