+sub setup_list_action_bar {
+  my ($self) = @_;
+
+  for my $bar ($::request->layout->get('actionbar')) {
+    $bar->add(
+      action => [
+        t8('Add'),
+        link => $self->url_for(action => 'new', module => $self->module),
+      ],
+    );
+  }
+}
+
+sub setup_form_action_bar {
+  my ($self) = @_;
+
+  my $is_new = !$self->config->id;
+
+  for my $bar ($::request->layout->get('actionbar')) {
+    $bar->add(
+      combobox => [
+        action => [
+          t8('Save'),
+          submit    => [ '#form', { action => 'CustomVariableConfig/' . ($is_new ? 'create' : 'update') } ],
+          checks    => [ 'check_prerequisites' ],
+          accesskey => 'enter',
+        ],
+
+        action => [
+          t8('Save as new'),
+          submit => [ '#form', { action => 'CustomVariableConfig/create'} ],
+          checks => [ 'check_prerequisites' ],
+          not_if => $is_new,
+        ],
+      ], # end of combobox "Save"
+
+      action => [
+        t8('Delete'),
+        submit   => [ '#form', { action => 'CustomVariableConfig/destroy' } ],
+        confirm  => t8('Do you really want to delete this object?'),
+        disabled => $is_new ? t8('This object has not been saved yet.') : undef,
+      ],
+
+      'separator',
+
+      link => [
+        t8('Abort'),
+        link => $self->url_for(action => 'list', module => $self->module),
+      ],
+    );
+  }
+}
+