Auftrags-Controller: neuen Artikel aus Maske heraus anlegen können
[kivitendo-erp.git] / SL / Controller / Part.pm
index 14be0ed..3f7409e 100644 (file)
@@ -157,6 +157,14 @@ sub action_save {
   }
 }
 
+sub action_abort {
+  my ($self) = @_;
+
+  if ( $::form->{callback} ) {
+    $self->redirect_to($::form->unescape($::form->{callback}));
+  }
+}
+
 sub action_delete {
   my ($self) = @_;
 
@@ -1334,6 +1342,12 @@ sub _setup_form_action_bar {
         ],
       ], # end of combobox "Save"
 
+      action => [
+        t8('Abort'),
+        submit   => [ '#ic', { action => "Part/abort" } ],
+        only_if  => !!$::form->{show_abort},
+      ],
+
       action => [
         t8('Delete'),
         call     => [ 'kivi.Part.delete' ],