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)
|
||||
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):
|
||||
self.processData(self.parseFormData())
|
||||
self.store()
|
||||
self.send_redirect(self.request.path)
|
||||
self.send_redirect(self.getSuccessfulRedirect())
|
||||
|
||||
def processData(self, data):
|
||||
config = self.getData()
|
||||
|
@ -197,6 +197,9 @@ class NewSdrDeviceController(SettingsFormController):
|
||||
config["sdrs"] = sdrs
|
||||
super().store()
|
||||
|
||||
def getSuccessfulRedirect(self):
|
||||
return "{}settings/sdr/{}".format(self.get_document_root(), self.stack["id"])
|
||||
|
||||
|
||||
class SdrProfileController(SdrFormController):
|
||||
def __init__(self, handler, request, options):
|
||||
|
Loading…
Reference in New Issue
Block a user