fixed bug [ 844961 ] DataForm: no deleting
This commit is contained in:
parent
af8adc55e7
commit
d8f796fe91
2 changed files with 12 additions and 15 deletions
|
|
@ -10,6 +10,7 @@
|
|||
- Fixed bug [ 844196 ] Time formats
|
||||
- Fixed a bug in the forum where new replies defaulted to always subscribing
|
||||
the user to the thread.
|
||||
- Fixed bug [ 844961 ] DataForm: no deleting
|
||||
- Bugfix [ 822324 ]: From field not working in DataForm when mailing to group
|
||||
- Fixed typos in importCollateral.pl
|
||||
|
||||
|
|
|
|||
|
|
@ -166,8 +166,8 @@ sub getRecordTemplateVars {
|
|||
$var->{"entryList.label"} = WebGUI::International::get(86,$self->get("namespace"));
|
||||
$var->{"export.tab.url"} = WebGUI::URL::page('func=exportTab&wid='.$self->get("wobjectId"));
|
||||
$var->{"export.tab.label"} = WebGUI::International::get(84,$self->get("namespace"));
|
||||
+ $var->{"delete.url"} = WebGUI::URL::page('func=delete&wid='.$self->get("wobjectId").'&entryId='.$var->{entryId});
|
||||
+ $var->{"delete.label"} = WebGUI::International::get(90,$self->get("namespace"));
|
||||
$var->{"delete.url"} = WebGUI::URL::page('func=deleteEntry&wid='.$self->get("wobjectId").'&entryId='.$var->{entryId});
|
||||
$var->{"delete.label"} = WebGUI::International::get(90,$self->get("namespace"));
|
||||
$var->{"back.url"} = WebGUI::URL::page();
|
||||
$var->{"back.label"} = WebGUI::International::get(18,$self->get("namespace"));
|
||||
$var->{"addField.url"} = WebGUI::URL::page('func=editField&wid='.$self->get("wobjectId"));
|
||||
|
|
@ -315,6 +315,15 @@ sub uiLevel {
|
|||
return 5;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteEntry {
|
||||
return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditWobject($_[0]->get("wobjectId")));
|
||||
my $entryId = $session{form}{entryId};
|
||||
WebGUI::SQL->write("delete from DataForm_entry where DataForm_entryId=".$entryId);
|
||||
$session{form}{entryId} = 'list';
|
||||
return $_[0]->www_view();
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteField {
|
||||
return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditWobject($_[0]->get("wobjectId")));
|
||||
|
|
@ -654,19 +663,6 @@ sub www_view {
|
|||
return $_[0]->processTemplate($_[0]->get("templateId"),$var);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_delete {
|
||||
my $entryId = $session{form}{entryId};
|
||||
if (!WebGUI::Privilege::canEditWobject($_[0]->get("wobjectId"))) {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
|
||||
WebGUI::SQL->write("delete from DataForm_entry where DataForm_entryId=".$entryId);
|
||||
|
||||
$session{form}{entryId} = 'list';
|
||||
return $_[0]->www_view();
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue