*/
@MenuName("DeleteSone")
@TemplatePath("/templates/deleteSone.html")
-class DeleteSonePage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
- LoggedInPage("deleteSone.html", "Page.DeleteSone.Title", webInterface, loaders, templateRenderer) {
+@ToadletPath("deleteSone.html")
+class DeleteSonePage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) :
+ LoggedInPage("Page.DeleteSone.Title", webInterface, loaders, templateRenderer) {
override fun handleRequest(soneRequest: SoneRequest, currentSone: Sone, templateContext: TemplateContext) {
if (soneRequest.isPOST) {
if (soneRequest.httpRequest.isPartSet("deleteSone")) {
soneRequest.core.deleteSone(currentSone)
}
- throw RedirectException("index.html")
+ redirectTo("index.html")
}
}