add working redirect after device add completes
This commit is contained in:
parent
c0b7cf5f8d
commit
fdbb76bca1
@ -78,10 +78,13 @@ class SettingsFormController(AuthorizationMixin, WebpageController, metaclass=AB
|
|||||||
data = parse_qs(self.get_body().decode("utf-8"), keep_blank_values=True)
|
data = parse_qs(self.get_body().decode("utf-8"), keep_blank_values=True)
|
||||||
return {k: v for i in self.getSections() for k, v in i.parse(data).items()}
|
return {k: v for i in self.getSections() for k, v in i.parse(data).items()}
|
||||||
|
|
||||||
|
def getSuccessfulRedirect(self):
|
||||||
|
return self.request.path
|
||||||
|
|
||||||
def processFormData(self):
|
def processFormData(self):
|
||||||
self.processData(self.parseFormData())
|
self.processData(self.parseFormData())
|
||||||
self.store()
|
self.store()
|
||||||
self.send_redirect(self.request.path)
|
self.send_redirect(self.getSuccessfulRedirect())
|
||||||
|
|
||||||
def processData(self, data):
|
def processData(self, data):
|
||||||
config = self.getData()
|
config = self.getData()
|
||||||
|
@ -197,6 +197,9 @@ class NewSdrDeviceController(SettingsFormController):
|
|||||||
config["sdrs"] = sdrs
|
config["sdrs"] = sdrs
|
||||||
super().store()
|
super().store()
|
||||||
|
|
||||||
|
def getSuccessfulRedirect(self):
|
||||||
|
return "{}settings/sdr/{}".format(self.get_document_root(), self.stack["id"])
|
||||||
|
|
||||||
|
|
||||||
class SdrProfileController(SdrFormController):
|
class SdrProfileController(SdrFormController):
|
||||||
def __init__(self, handler, request, options):
|
def __init__(self, handler, request, options):
|
||||||
|
Loading…
Reference in New Issue
Block a user