: '';
flash_later('info', $text);
- my @redirect_params = (
- action => 'edit',
- type => $self->type,
- id => $self->order->id,
- );
+ my @redirect_params;
+ if ($::form->{back_to_caller}) {
+ @redirect_params = $::form->{callback} ? ($::form->{callback})
+ : (controller => 'LoginScreen', action => 'user_login');
+
+ } else {
+ @redirect_params = (
+ action => 'edit',
+ type => $self->type,
+ id => $self->order->id,
+ callback => $::form->{callback},
+ );
+ }
$self->redirect_to(@redirect_params);
}
],
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
],
+ action => [
+ t8('Save and Close'),
+ call => [ 'kivi.Order.save', 'save', $::instance_conf->get_order_warn_duplicate_parts,
+ $::instance_conf->get_order_warn_no_deliverydate,
+ 1
+ ],
+ checks => [ 'kivi.Order.check_save_active_periodic_invoices', ['kivi.validate_form','#order_form'],
+ @req_trans_cost_art, @req_cusordnumber,
+ ],
+ disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
+ ],
action => [
t8('Save as new'),
call => [ 'kivi.Order.save', 'save_as_new', $::instance_conf->get_order_warn_duplicate_parts ],
only_if => $deletion_allowed,
],
+ combobox => [
+ action => [
+ t8('more')
+ ],
+ action => [
+ t8('History'),
+ call => [ 'set_history_window', $self->order->id, 'id' ],
+ disabled => !$self->order->id ? t8('This record has not been saved yet.') : undef,
+ ],
+ action => [
+ t8('Follow-Up'),
+ call => [ 'kivi.Order.follow_up_window' ],
+ disabled => !$self->order->id ? t8('This object has not been saved yet.') : undef,
+ only_if => $::auth->assert('productivity', 1),
+ ],
+ ], # end of combobox "more"
);
}
}