Added a javascript confirmation popup for delete icon
This commit is contained in:
parent
c3a9a97f9f
commit
cd4bf169fa
3 changed files with 6 additions and 33 deletions
|
|
@ -88,7 +88,7 @@ sub _fieldAdminIcons {
|
|||
my $fid = $_[1];
|
||||
my $tid = $_[2];
|
||||
my $output;
|
||||
$output = deleteIcon('func=deleteField&wid='.$_[0]->get("wobjectId").'&fid='.$fid.'&tid='.$tid) unless ($_[3]);
|
||||
$output = deleteIcon('func=deleteFieldConfirm&wid='.$_[0]->get("wobjectId").'&fid='.$fid.'&tid='.$tid,'',WebGUI::International::get(19,$_[0]->get("namespace"))) unless ($_[3]);
|
||||
$output .= editIcon('func=editField&wid='.$_[0]->get("wobjectId").'&fid='.$fid.'&tid='.$tid)
|
||||
.moveUpIcon('func=moveFieldUp&wid='.$_[0]->get("wobjectId").'&fid='.$fid.'&tid='.$tid)
|
||||
.moveDownIcon('func=moveFieldDown&wid='.$_[0]->get("wobjectId").'&fid='.$fid.'&tid='.$tid);
|
||||
|
|
@ -98,7 +98,7 @@ sub _fieldAdminIcons {
|
|||
sub _tabAdminIcons {
|
||||
my $tid = $_[1];
|
||||
my $output;
|
||||
$output = deleteIcon('func=deleteTab&wid='.$_[0]->get("wobjectId").'&tid='.$tid) unless ($_[2]);
|
||||
$output = deleteIcon('func=deleteTabConfirm&wid='.$_[0]->get("wobjectId").'&tid='.$tid,'',WebGUI::International::get(100,$_[0]->get("namespace"))) unless ($_[2]);
|
||||
$output .= editIcon('func=editTab&wid='.$_[0]->get("wobjectId").'&tid='.$tid)
|
||||
.moveLeftIcon('func=moveTabLeft&wid='.$_[0]->get("wobjectId").'&tid='.$tid)
|
||||
.moveRightIcon('func=moveTabRight&wid='.$_[0]->get("wobjectId").'&tid='.$tid);
|
||||
|
|
@ -487,13 +487,6 @@ sub www_deleteEntry {
|
|||
return $_[0]->www_view();
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteField {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
return $_[0]->confirm(WebGUI::International::get(19,$_[0]->get("namespace")),
|
||||
WebGUI::URL::page('func=deleteFieldConfirm&wid='.$_[0]->get("wobjectId").'&fid='.$session{form}{fid}));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteFieldConfirm {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
|
|
@ -502,13 +495,6 @@ sub www_deleteFieldConfirm {
|
|||
return "";
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteTab {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
return $_[0]->confirm(WebGUI::International::get(100,$_[0]->get("namespace")),
|
||||
WebGUI::URL::page('func=deleteTabConfirm&wid='.$_[0]->get("wobjectId").'&tid='.$session{form}{tid}));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteTabConfirm {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue