details: https://code.tryton.org/tryton/commit/f55ded4e67aa
branch: 7.8
user: Cédric Krier <[email protected]>
date: Wed Dec 17 23:35:27 2025 +0100
description:
Do not render details button on error message without details
Closes #14426
(grafted from 5484d7e3b8e0a5ea20e0f22859d6895b7c787309)
diffstat:
sao/src/common.js | 29 +++++++++++++++--------------
1 files changed, 15 insertions(+), 14 deletions(-)
diffs (40 lines):
diff -r e350d1e9f141 -r f55ded4e67aa sao/src/common.js
--- a/sao/src/common.js Wed Dec 17 16:13:44 2025 +0100
+++ b/sao/src/common.js Wed Dec 17 23:35:27 2025 +0100
@@ -3639,21 +3639,22 @@
'white-space': 'pre-wrap',
'word-break': 'break-all',
}));
- alert_.append(jQuery('<p/>').append(jQuery('<a/>', {
- 'class': 'btn btn-default',
- role: 'button',
- 'data-toggle': 'collapse',
- 'data-target': '#error-detail',
- 'aria-expanded': false,
- 'aria-controls': '#error-detail',
- }).text(Sao.i18n.gettext("Details"))));
if (details) {
- alert_.append(jQuery('<p/>', {
- 'class': 'collapse',
- id: 'error-detail',
- }).append(jQuery('<pre/>', {
- 'class': 'pre-scrollable',
- }).text(details)));
+ alert_.append(
+ jQuery('<p/>').append(jQuery('<a/>', {
+ 'class': 'btn btn-default',
+ role: 'button',
+ 'data-toggle': 'collapse',
+ 'data-target': '#error-detail',
+ 'aria-expanded': false,
+ 'aria-controls': '#error-detail',
+ }).text(Sao.i18n.gettext("Details"))))
+ .append(jQuery('<p/>', {
+ 'class': 'collapse',
+ id: 'error-detail',
+ }).append(jQuery('<pre/>', {
+ 'class': 'pre-scrollable',
+ }).text(details)));
}
jQuery('<a/>', {
'class': 'btn btn-link',