From 8671f98c14da0d504ef973f0507cc640896774ed Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Wed, 3 Mar 2021 22:33:37 +0100 Subject: [PATCH] implement "add profile" sequence --- owrx/controllers/settings/sdr.py | 60 +++++++++++++++++++++++++++----- owrx/http.py | 8 +++++ 2 files changed, 60 insertions(+), 8 deletions(-) diff --git a/owrx/controllers/settings/sdr.py b/owrx/controllers/settings/sdr.py index 307509f..d33b9a6 100644 --- a/owrx/controllers/settings/sdr.py +++ b/owrx/controllers/settings/sdr.py @@ -65,9 +65,12 @@ class SdrDeviceListController(AuthorizationMixin, WebpageController):
{num_profiles} profile(s)
{additional_info} - +
+ + Add profile... +
""".format( @@ -77,6 +80,7 @@ class SdrDeviceListController(AuthorizationMixin, WebpageController): num_profiles=len(config["profiles"]), additional_info=additional_info, profiles="".join(render_profile(device_id, p_id, p) for p_id, p in config["profiles"].items()), + newprofile_link="{}settings/sdr/{}/newprofile".format(self.get_document_root(), quote(device_id)), ) return """ @@ -114,6 +118,8 @@ class SdrFormController(SettingsFormController, metaclass=ABCMeta): return None, None return device_id, config["sdrs"][device_id] + +class SdrFormControllerWithModal(SdrFormController, metaclass=ABCMeta): def buildModal(self): return """