Added a javascript confirmation popup for delete icon
This commit is contained in:
parent
a0c6f5e755
commit
5df374af75
2 changed files with 1 additions and 23 deletions
|
|
@ -39,7 +39,7 @@ sub www_listRoots {
|
|||
$sth = WebGUI::SQL->read("select * from page where title<>'Reserved' and parentId='0' order by title");
|
||||
while (%data = $sth->hash) {
|
||||
$row[$i] = '<tr><td valign="top" class="tableData">'
|
||||
.deleteIcon('op=deletePage',$data{urlizedTitle})
|
||||
.deleteIcon('op=deletePageConfirm',$data{urlizedTitle},WebGUI::International::get(101))
|
||||
.editIcon('op=editPage',$data{urlizedTitle})
|
||||
.cutIcon('op=cutPage',$data{urlizedTitle})
|
||||
.'</td>';
|
||||
|
|
|
|||
|
|
@ -1165,28 +1165,6 @@ sub www_cut {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_delete ( )
|
||||
|
||||
Prompts a user to confirm whether they wish to delete this instance.
|
||||
|
||||
=cut
|
||||
|
||||
sub www_delete {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
my $output = WebGUI::International::get(43);
|
||||
$output .= '<p>';
|
||||
$output .= '<div align="center"><a href="'.WebGUI::URL::page('func=deleteConfirm&wid='. $self->get("wobjectId")).'">';
|
||||
$output .= WebGUI::International::get(44);
|
||||
$output .= '</a>';
|
||||
$output .= ' <a href="'.WebGUI::URL::page().'">';
|
||||
$output .= WebGUI::International::get(45);
|
||||
$output .= '</a></div>';
|
||||
return $self->adminConsole($output,'42',"wobject delete","WebGUI");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_deleteConfirm ( )
|
||||
|
||||
Moves this instance to the trash.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue