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:
parent
7b7f3be628
commit
0b5a77515f
2 changed files with 2 additions and 5 deletions
|
|
@ -47,7 +47,7 @@ sub new {
|
|||
my $cancelURL = $session->request->referer;
|
||||
my $cancelJS_fragment = $cancelURL ? sprintf("window.location.href='%s'", $cancelURL) : ' history.go(-1)';
|
||||
my $cancelJS = q{
|
||||
if( window.parent && window.parent.admin window.parent.admin.modalDialog ) {
|
||||
if( window.parent && window.parent.admin && window.parent.admin.modalDialog ) {
|
||||
window.parent.admin.closeModalDialog();
|
||||
} else {
|
||||
$cancelJS_fragment;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue