feat: support primary_action for frappe.throw
This commit is contained in:
parent
eb1b1b4d6b
commit
40f1ae1cce
1 changed files with 9 additions and 1 deletions
|
|
@ -659,11 +659,18 @@ def throw(
|
|||
is_minimizable: bool = False,
|
||||
wide: bool = False,
|
||||
as_list: bool = False,
|
||||
primary_action=None,
|
||||
) -> None:
|
||||
"""Throw execption and show message (`msgprint`).
|
||||
|
||||
:param msg: Message.
|
||||
:param exc: Exception class. Default `frappe.ValidationError`"""
|
||||
:param exc: Exception class. Default `frappe.ValidationError`
|
||||
:param title: [optional] Message title. Default: "Message".
|
||||
:param is_minimizable: [optional] Allow users to minimize the modal
|
||||
:param wide: [optional] Show wide modal
|
||||
:param as_list: [optional] If `msg` is a list, render as un-ordered list.
|
||||
:param primary_action: [optional] Bind a primary server/client side action.
|
||||
"""
|
||||
msgprint(
|
||||
msg,
|
||||
raise_exception=exc,
|
||||
|
|
@ -672,6 +679,7 @@ def throw(
|
|||
is_minimizable=is_minimizable,
|
||||
wide=wide,
|
||||
as_list=as_list,
|
||||
primary_action=primary_action,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue