fix: auto-sign on check rispetta AUTO_SIGN + nascosto in basic mode
- plugin.py: auto-sign setting con widget nominati, nascosto in basic mode (visibile solo in ADVANCED, come welist server e calendar app) - dialogs.py: _on_success_phase1_body() salta firma/broadcast quando AUTO_SIGN è OFF (solo in advanced; basic usa sempre default=True) - dialogs.py: _show_next_steps_hint() sopprime hint manuali anche in basic mode (dove auto-sign è sempre attivo)
This commit is contained in:
@@ -1399,23 +1399,31 @@ class BalBuildWillDialog(BalDialog):
|
|||||||
return
|
return
|
||||||
|
|
||||||
elif self.have_to_sign:
|
elif self.have_to_sign:
|
||||||
# If the will was rebuilt with an automatically anticipated delivery
|
auto_sign = (
|
||||||
# date, explain WHY we are now asking to sign: otherwise the sign
|
self.bal_window.bal_plugin.is_basic_mode()
|
||||||
# prompt appears with no reason (owner feedback). The note is shown
|
or self.bal_window.bal_plugin.AUTO_SIGN.get()
|
||||||
# on the "Building your will" row (orange warning) before the modal
|
)
|
||||||
# password prompt opens, so the user can read it.
|
if not auto_sign:
|
||||||
|
self.msg_set_signing(
|
||||||
|
_("Auto-sign disabled — sign manually")
|
||||||
|
)
|
||||||
|
self.have_to_sign = False
|
||||||
|
else:
|
||||||
|
# If the will was rebuilt with an automatically anticipated
|
||||||
|
# delivery date, explain WHY we are now asking to sign:
|
||||||
|
# otherwise the sign prompt appears with no reason (owner
|
||||||
|
# feedback). The note is shown on the "Building your will"
|
||||||
|
# row (orange warning) before the modal password prompt
|
||||||
|
# opens, so the user can read it.
|
||||||
if self._date_was_anticipated:
|
if self._date_was_anticipated:
|
||||||
# Render this notice in BLACK BOLD (not the yellow warning
|
|
||||||
# colour) and split it onto TWO lines after "...previous one."
|
|
||||||
# for readability (allegato17). The "\n" is converted to a line
|
|
||||||
# break by msg_update (it replaces "\n" with "<br>").
|
|
||||||
self.msg_set_building(
|
self.msg_set_building(
|
||||||
"<b>{}</b>".format(
|
"<b>{}</b>".format(
|
||||||
_(
|
_(
|
||||||
"The delivery date was automatically moved one day "
|
"The delivery date was automatically moved "
|
||||||
"earlier so the updated will can correctly replace "
|
"one day earlier so the updated will can "
|
||||||
"the previous one.\n"
|
"correctly replace the previous one.\n"
|
||||||
"Please sign (and broadcast) to confirm the change."
|
"Please sign (and broadcast) to confirm "
|
||||||
|
"the change."
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -1628,7 +1636,10 @@ class BalBuildWillDialog(BalDialog):
|
|||||||
# them in that case. When AUTO_SIGN is OFF, keep the previous behaviour
|
# them in that case. When AUTO_SIGN is OFF, keep the previous behaviour
|
||||||
# and guide the user through the remaining manual steps.
|
# and guide the user through the remaining manual steps.
|
||||||
try:
|
try:
|
||||||
if self.bal_window.bal_plugin.AUTO_SIGN.get():
|
if (
|
||||||
|
self.bal_window.bal_plugin.is_basic_mode()
|
||||||
|
or self.bal_window.bal_plugin.AUTO_SIGN.get()
|
||||||
|
):
|
||||||
return
|
return
|
||||||
except Exception:
|
except Exception:
|
||||||
# If the setting cannot be read for any reason, fall back to the
|
# If the setting cannot be read for any reason, fall back to the
|
||||||
|
|||||||
@@ -470,7 +470,9 @@ class Plugin(BalPlugin):
|
|||||||
lbl_event_summary, edit_event_summary, help_event_summary,
|
lbl_event_summary, edit_event_summary, help_event_summary,
|
||||||
lbl_event_description, edit_event_description, help_event_description,
|
lbl_event_description, edit_event_description, help_event_description,
|
||||||
lbl_calendar_app, edit_calendar_app, help_calendar_app,
|
lbl_calendar_app, edit_calendar_app, help_calendar_app,
|
||||||
reset_btn_6, reset_btn_7, reset_btn_8, reset_btn_9, reset_btn_10):
|
lbl_auto_sign, heir_auto_sign, help_auto_sign,
|
||||||
|
reset_btn_6, reset_btn_7, reset_btn_8, reset_btn_9, reset_btn_10,
|
||||||
|
reset_btn_auto_sign):
|
||||||
w.setVisible(not basic)
|
w.setVisible(not basic)
|
||||||
self.update_all()
|
self.update_all()
|
||||||
|
|
||||||
@@ -553,19 +555,20 @@ class Plugin(BalPlugin):
|
|||||||
"Hide invalidated transactions from will detail and list",
|
"Hide invalidated transactions from will detail and list",
|
||||||
)
|
)
|
||||||
grid.addWidget(_make_reset_btn(self.HIDE_INVALIDATED, heir_hide_invalidated, "check"), 1, 3)
|
grid.addWidget(_make_reset_btn(self.HIDE_INVALIDATED, heir_hide_invalidated, "check"), 1, 3)
|
||||||
add_widget(
|
lbl_auto_sign = QLabel(_("Auto-sign on Check"))
|
||||||
grid,
|
help_auto_sign = HelpButton(
|
||||||
"Auto-sign on Check",
|
|
||||||
heir_auto_sign,
|
|
||||||
2,
|
|
||||||
(
|
|
||||||
"When checking, automatically sign and broadcast the will "
|
"When checking, automatically sign and broadcast the will "
|
||||||
"transactions to their will-executors.\n"
|
"transactions to their will-executors.\n"
|
||||||
"The wallet password is requested only if the wallet is "
|
"The wallet password is requested only if the wallet is "
|
||||||
"encrypted."
|
"encrypted."
|
||||||
),
|
|
||||||
)
|
)
|
||||||
grid.addWidget(_make_reset_btn(self.AUTO_SIGN, heir_auto_sign, "check"), 2, 3)
|
grid.addWidget(lbl_auto_sign, 2, 0)
|
||||||
|
grid.addWidget(heir_auto_sign, 2, 1)
|
||||||
|
grid.addWidget(help_auto_sign, 2, 2)
|
||||||
|
reset_btn_auto_sign = _make_reset_btn(
|
||||||
|
self.AUTO_SIGN, heir_auto_sign, "check"
|
||||||
|
)
|
||||||
|
grid.addWidget(reset_btn_auto_sign, 2, 3)
|
||||||
add_widget(
|
add_widget(
|
||||||
grid,
|
grid,
|
||||||
"Panel editable Date and Fee",
|
"Panel editable Date and Fee",
|
||||||
@@ -692,7 +695,9 @@ class Plugin(BalPlugin):
|
|||||||
lbl_event_summary, edit_event_summary, help_event_summary,
|
lbl_event_summary, edit_event_summary, help_event_summary,
|
||||||
lbl_event_description, edit_event_description, help_event_description,
|
lbl_event_description, edit_event_description, help_event_description,
|
||||||
lbl_calendar_app, edit_calendar_app, help_calendar_app,
|
lbl_calendar_app, edit_calendar_app, help_calendar_app,
|
||||||
reset_btn_6, reset_btn_7, reset_btn_8, reset_btn_9, reset_btn_10):
|
lbl_auto_sign, heir_auto_sign, help_auto_sign,
|
||||||
|
reset_btn_6, reset_btn_7, reset_btn_8, reset_btn_9, reset_btn_10,
|
||||||
|
reset_btn_auto_sign):
|
||||||
w.setVisible(not basic_init)
|
w.setVisible(not basic_init)
|
||||||
|
|
||||||
grid.addWidget(heir_repush, 11, 0)
|
grid.addWidget(heir_repush, 11, 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user