Revision 9c76baca
Von Sven Schöling vor fast 8 Jahren hinzugefügt
SL/Controller/Part.pm | ||
---|---|---|
use SL::DB::History;
|
||
use SL::DB::Helper::ValidateAssembly qw(validate_assembly);
|
||
use SL::CVar;
|
||
use SL::MoreCommon qw(save_form);
|
||
use Carp;
|
||
|
||
use Rose::Object::MakeMethods::Generic (
|
||
... | ... | |
$self->add;
|
||
};
|
||
|
||
sub action_add_from_record {
|
||
my ($self) = @_;
|
||
|
||
check_has_valid_part_type($::form->{part}{part_type});
|
||
|
||
$self->parse_form;
|
||
$self->add;
|
||
}
|
||
|
||
sub action_add {
|
||
my ($self) = @_;
|
||
|
||
... | ... | |
flash_later('info', $is_new ? t8('The item has been created.') . " " . $self->part->displayable_name : t8('The item has been saved.'));
|
||
|
||
if ( $::form->{callback} ) {
|
||
$self->redirect_to($::form->unescape($::form->{callback}));
|
||
$self->redirect_to($::form->unescape($::form->{callback}) . '&new_parts_id=' . $self->part->id);
|
||
|
||
} else {
|
||
# default behaviour after save: reload item, this also resets last_modification!
|
||
$self->redirect_to(controller => 'Part', action => 'edit', 'part.id' => $self->part->id);
|
Auch abrufbar als: Unified diff
Artikel anlegen mit Rücksprung in Belege