diff --git a/owrx/controllers/settings/sdr.py b/owrx/controllers/settings/sdr.py
index 4966c41..a61a1e8 100644
--- a/owrx/controllers/settings/sdr.py
+++ b/owrx/controllers/settings/sdr.py
@@ -126,13 +126,14 @@ class SdrFormController(SettingsFormController, metaclass=ABCMeta):
{profile_tabs}
- New profile
+ New profile
""".format(
device_link="{}settings/sdr/{}".format(self.get_document_root(), quote(self.device_id)),
device_name=self.device["name"],
device_active="active" if self.isDeviceActive() else "",
+ new_profile_active="active" if self.isNewProfileActive() else "",
new_profile_link="{}settings/sdr/{}/newprofile".format(self.get_document_root(), quote(self.device_id)),
profile_tabs="".join(
"""
@@ -156,6 +157,9 @@ class SdrFormController(SettingsFormController, metaclass=ABCMeta):
def isProfileActive(self, profile_id) -> bool:
return False
+ def isNewProfileActive(self) -> bool:
+ return False
+
def store(self):
# need to overwrite the existing key in the config since the layering won't capture the changes otherwise
config = Config.get()
@@ -383,6 +387,9 @@ class NewProfileController(SdrFormController):
def getTitle(self):
return "New profile"
+ def isNewProfileActive(self) -> bool:
+ return True
+
def store(self):
if self.stack["id"] in self.device["profiles"]:
raise ValueError("Profile {} already exists!".format(self.stack["id"]))