From 9db949cef2b136e1a341e6c3f8a5bde3cd48313c Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 18 Jan 2023 12:38:08 +0100 Subject: [PATCH] add correct descriptions in the pop ups --- ereuse_devicehub/inventory/forms.py | 10 ++++++++++ .../templates/inventory/snapshot_detail.html | 15 +++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/ereuse_devicehub/inventory/forms.py b/ereuse_devicehub/inventory/forms.py index 90b900f5..1e641f32 100644 --- a/ereuse_devicehub/inventory/forms.py +++ b/ereuse_devicehub/inventory/forms.py @@ -1745,6 +1745,16 @@ class UserTrustsForm(FlaskForm): self._unic = len(self._devices) < 2 return self._unic + def dhids_all_devices(self): + self.unic() + return ", ".join([x.dhid for x in self._devices][1:]) + + def dhid_base(self): + self.unic() + if not self._devices: + return '' + return self._devices[0].dhid + def show(self): if not self.snapshot or not self.device: return False diff --git a/ereuse_devicehub/templates/inventory/snapshot_detail.html b/ereuse_devicehub/templates/inventory/snapshot_detail.html index c3a91cec..efba84d4 100644 --- a/ereuse_devicehub/templates/inventory/snapshot_detail.html +++ b/ereuse_devicehub/templates/inventory/snapshot_detail.html @@ -100,14 +100,21 @@