Added a javascript confirmation popup for delete icon
This commit is contained in:
parent
0fb088c22d
commit
a0c6f5e755
2 changed files with 2 additions and 26 deletions
|
|
@ -239,30 +239,6 @@ sub www_cutPage {
|
|||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
=head2 www_deletePage
|
||||
|
||||
This function returns an 'Are you sure' page for moving the page to the trash.
|
||||
|
||||
=cut
|
||||
sub www_deletePage {
|
||||
my ($output);
|
||||
if ($session{page}{isSystem}) {
|
||||
return WebGUI::Privilege::vitalComponent();
|
||||
} elsif (WebGUI::Page::canEdit()) {
|
||||
$output .= helpIcon("page delete");
|
||||
$output .= '<h1>'.WebGUI::International::get(42).'</h1>';
|
||||
$output .= WebGUI::International::get(101).'<p>';
|
||||
$output .= '<div align="center"><a href="'.WebGUI::URL::page('op=deletePageConfirm').
|
||||
'">'.WebGUI::International::get(44).'</a>';
|
||||
$output .= ' <a href="'.WebGUI::URL::page().'">'.
|
||||
WebGUI::International::get(45).'</a></div>';
|
||||
return $output;
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
=head2 www_deletePageConfirm
|
||||
|
||||
|
|
|
|||
|
|
@ -543,7 +543,7 @@ sub generate {
|
|||
}
|
||||
$var{'page.canEdit'} = canEdit();
|
||||
$var{'page.controls'} = pageIcon()
|
||||
.deleteIcon('op=deletePage')
|
||||
.deleteIcon('op=deletePageConfirm','',WebGUI::International::get(101))
|
||||
.editIcon('op=editPage')
|
||||
.moveUpIcon('op=movePageUp')
|
||||
.moveDownIcon('op=movePageDown')
|
||||
|
|
@ -552,7 +552,7 @@ sub generate {
|
|||
my $sth = WebGUI::SQL->read("select * from wobject where pageId=".quote($session{page}{pageId})." order by sequenceNumber, wobjectId",WebGUI::SQL->getSlave);
|
||||
while (my $wobject = $sth->hashRef) {
|
||||
my $wobjectToolbar = wobjectIcon()
|
||||
.deleteIcon('func=delete&wid='.${$wobject}{wobjectId})
|
||||
.deleteIcon('func=deleteConfirm&wid='.${$wobject}{wobjectId},'',WebGUI::International::get(43))
|
||||
.editIcon('func=edit&wid='.${$wobject}{wobjectId})
|
||||
.moveUpIcon('func=moveUp&wid='.${$wobject}{wobjectId})
|
||||
.moveDownIcon('func=moveDown&wid='.${$wobject}{wobjectId})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue