mbdlyb_ui.dialogs ================= .. py:module:: mbdlyb_ui.dialogs .. autoapi-nested-parse:: Copyright (c) 2026 TNO-ESI All rights reserved. Functions --------- .. autoapisummary:: mbdlyb_ui.dialogs.confirm mbdlyb_ui.dialogs.confirm_delete mbdlyb_ui.dialogs.confirm_delete_relation Module Contents --------------- .. py:function:: confirm(title: str, message: str, confirm_text: str, on_confirm: Union[Callable, tuple[Callable, tuple[Any]]], confirm_color: str = 'primary') Show a confirmation dialog and invoke the selected callback on acceptance. :param title: Dialog heading. :param message: Explanation displayed beneath the heading. :param confirm_text: Label of the acceptance button. :param on_confirm: Callback or a callback paired with its positional arguments. :param confirm_color: Color of the acceptance button. .. py:function:: confirm_delete(obj, redirect_url: Union[str, mbdlyb.gdb.GMBDElement]) Confirm deletion of an object before navigating away. :param obj: Object with a ``delete`` method and optional ``on_delete`` hook. :param redirect_url: URL or element to visit after deletion. .. py:function:: confirm_delete_relation(relation: str, start: mbdlyb.gdb.GMBDElement, end: mbdlyb.gdb.GMBDElement, redirect_url: Union[str, mbdlyb.gdb.GMBDElement]) Confirm disconnection of two elements before navigating away. :param relation: Relationship attribute on the starting element. :param start: Element owning the relationship. :param end: Element to disconnect. :param redirect_url: URL or element to visit after disconnection.