From 7a69743bd74ba75cf862e53264daa3e6718b9ef0 Mon Sep 17 00:00:00 2001 From: Etienne Trimaille Date: Tue, 5 Dec 2023 10:10:22 +0100 Subject: [PATCH] Export the list of safeguards in the markdown --- lizmap/dialogs/main.py | 5 ++++- lizmap/server_lwc.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lizmap/dialogs/main.py b/lizmap/dialogs/main.py index ea16dbad..fa63d801 100755 --- a/lizmap/dialogs/main.py +++ b/lizmap/dialogs/main.py @@ -922,7 +922,9 @@ def radio_mode_normal_toggled(self): def safeguards_to_markdown(self) -> str: """ Export the list of safeguards to markdown. """ - text = 'List of safeguards :\n' + text = '
\n' + text += 'List of safeguards :\n' + text += '
\n\n' text += '* Mode : {}\n'.format('normal' if self.radio_normal.isChecked() else 'safe') text += '* Allow parent folder : {}\n'.format('yes' if self.radio_allow_parent_folder.isChecked() else 'no') if self.radio_allow_parent_folder.isChecked(): @@ -932,6 +934,7 @@ def safeguards_to_markdown(self) -> str: text += '* Prevent PG Auth DB : {}\n'.format('yes' if self.safe_pg_auth_db.isChecked() else 'no') text += '* Force PG user&pass : {}\n'.format('yes' if self.safe_pg_user_password.isChecked() else 'no') text += '* Prevent ECW : {}\n'.format('yes' if self.safe_ecw.isChecked() else 'no') + text += '
' return text def save_settings(self): diff --git a/lizmap/server_lwc.py b/lizmap/server_lwc.py index c58c6297..51040b1c 100755 --- a/lizmap/server_lwc.py +++ b/lizmap/server_lwc.py @@ -1114,6 +1114,7 @@ def context_menu_requested(self, position: QPoint): def copy_as_markdown(self, data: str, action_data: str, action_required: bool): """ Copy the server information. """ + data += '\n' + self.parent.safeguards_to_markdown() clipboard = QGuiApplication.clipboard() clipboard.setText(data) if not action_required: