X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FOptionsPage.kt;h=2c454e82d4a1d9e6aa08cdcdba54b958be311581;hp=782e5bb2c840b2eff1444cd9ac58eaef4fc30759;hb=aaf780d3c2a6f5ce47295786f3963c8b93f6a145;hpb=2e6be6f2fb6afede009dacc48b8e3318e30e5057 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/OptionsPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/OptionsPage.kt index 782e5bb..2c454e8 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/OptionsPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/OptionsPage.kt @@ -14,8 +14,9 @@ import javax.inject.* */ @MenuName("Options") @TemplatePath("/templates/options.html") +@ToadletPath("options.html") class OptionsPage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) : - SoneTemplatePage("options.html", webInterface, loaders, templateRenderer, pageTitleKey = "Page.Options.Title") { + SoneTemplatePage(webInterface, loaders, templateRenderer, pageTitleKey = "Page.Options.Title") { override fun handleRequest(soneRequest: SoneRequest, templateContext: TemplateContext) { if (soneRequest.isPOST) { @@ -65,7 +66,7 @@ class OptionsPage @Inject constructor(webInterface: WebInterface, loaders: Loade if (fieldsWithErrors.isEmpty()) { soneRequest.core.touchConfiguration() - throw RedirectException("options.html") + redirectTo("options.html") } templateContext["fieldErrors"] = fieldsWithErrors }