Skip to content

Commit

Permalink
Add delete button to dialog, too
Browse files Browse the repository at this point in the history
  • Loading branch information
flack committed Oct 23, 2024
1 parent 38481c5 commit dc3f289
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/net/nehmer/static/handler/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ public function _handler_edit(Request $request, string $guid)
'controller' => $this->load_controller(),
'save_callback' => $this->save_callback(...)
]);
if ($this->article->can_do('midgard:delete')) {
$delete = $this->get_workflow('delete', ['object' => $this->article]);
$workflow->add_dialog_button($delete, $this->router->generate('delete', ['guid' => $this->article->guid]));
}
return $workflow->run($request);
}

Expand Down

0 comments on commit dc3f289

Please sign in to comment.