make Form::Cancel better; make WebGUI::TabForm use it. so, logic migrated from TabForm to Form::Cancel where it's re-usable and fixed up for this new Doug admin.

This commit is contained in:
Scott Walters 2013-09-26 17:28:27 -05:00
parent 7b7f3be628
commit 0b5a77515f
2 changed files with 2 additions and 5 deletions

View file

@ -209,10 +209,7 @@ sub new {
if (my $cancelURL = $session->request->referer) {
$cancelJS = sprintf q{window.location.href='%s';}, $cancelURL;
}
my $cancel = WebGUI::Form::button($session,{
value=>$i18n->get('cancel'),
extras=>sprintf(q|onclick="%s" class="backwardButton"|, $cancelJS),
});
my $cancel = WebGUI::Form::cancel($session);
bless { _session=>$session, _cancel=>$cancel, _submit=>WebGUI::Form::submit($session),
_form=>WebGUI::Form::formHeader($session), _hidden=>"", _tab=>\%tabs, _css=>$css }, $class;
}