web icon indicating copy to clipboard operation
web copied to clipboard

[12.0][ADD] web_form_banner

Open yostashiro opened this issue 3 months ago • 2 comments

The module adds configurable banners for backend form views. Define rules per model (and optionally per view) to show context-aware alerts with a chosen severity (info/warning/danger).

Messages can be plain text with ${placeholders} or fully custom HTML; visibility, severity, and values are computed server-side via a safe Python expression.

Banners are injected just before or after a target node (default: //sheet) and refresh on form load/save/reload.

@qrtl QT5611

yostashiro avatar Sep 15 '25 15:09 yostashiro

@AungKoKoLin1997 Just added a commit since the message translation wasn't working. Also re-allocated some eval context vars from _get_banner_eval_context() to _banner_base_eval_ctx_static().

Please squash once you confirm this, and apply the same in the migration PR.

yostashiro avatar Sep 16 '25 14:09 yostashiro

@AungKoKoLin1997 It was mistaken when I said the update didn't work. The updated code actually works fine.

yostashiro avatar Sep 19 '25 12:09 yostashiro