From 89b50e2459f218292fee0fe97a703c4c5af791a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Fri, 18 Sep 2026 13:30:12 +0200 Subject: [PATCH] Add an optional icon to the login services Closes #14915 --- modules/authentication_saml/routes.py | 5 ++++- sao/CHANGELOG | 1 + sao/src/session.js | 14 +++++++++++--- tryton/CHANGELOG | 1 + tryton/tryton/gui/window/dblogin.py | 17 +++++++++++++++-- trytond/CHANGELOG | 1 + trytond/doc/ref/index.rst | 1 + trytond/doc/ref/protocols/dispatcher.rst | 12 ++++++++++++ trytond/doc/ref/protocols/index.rst | 12 ++++++++++++ trytond/trytond/protocols/dispatcher.py | 8 ++++++-- 10 files changed, 64 insertions(+), 8 deletions(-) create mode 100644 trytond/doc/ref/protocols/dispatcher.rst create mode 100644 trytond/doc/ref/protocols/index.rst diff --git a/modules/authentication_saml/routes.py b/modules/authentication_saml/routes.py index 4dc9644bbe..2bafd4fe25 100644 --- a/modules/authentication_saml/routes.py +++ b/modules/authentication_saml/routes.py @@ -24,13 +24,16 @@ IDENTITIES = set() METADATA = {} CONFIG_FILENAME = {} LOGIN = {} +ICON = {} if config.has_section('authentication_saml'): for identity in config.options('authentication_saml'): IDENTITIES.add(identity) name = config.get('authentication_saml', identity) + icon = ICON[identity] = config.get( + f'authentication_saml {identity}', 'icon', default='') register_authentication_service( - name, f'/r/authentication/saml/{identity}/login') + name, f'/r/authentication/saml/{identity}/login', icon) metadata = config.get( f'authentication_saml {identity}', 'metadata', default=None) if metadata: diff --git a/sao/CHANGELOG b/sao/CHANGELOG index af7cc0057c..576425e658 100644 --- a/sao/CHANGELOG +++ b/sao/CHANGELOG @@ -1,3 +1,4 @@ +* Support icon for login services * Edit the selected One2Many rows sequentially * Support filename extension for Binary field * Use record name as fallback for filename of Binary field diff --git a/sao/src/session.js b/sao/src/session.js index 68ca27d2d9..140c5b8e12 100644 --- a/sao/src/session.js +++ b/sao/src/session.js @@ -388,12 +388,20 @@ dialog.body.append(jQuery('
', { 'class': 'panel panel-default', }).append(panel_body)); - for (const [name, url] of services) { - panel_body.append(jQuery('