X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FOptionsPage.kt;h=2c454e82d4a1d9e6aa08cdcdba54b958be311581;hb=aaf780d3c2a6f5ce47295786f3963c8b93f6a145;hp=31f2d893970bca6dc7a38184fb0b4a375406ab4c;hpb=a76956e389fcfe6282ad4ca7156bbf76327bb0c0;p=Sone.git 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 31f2d89..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") -class OptionsPage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer): - SoneTemplatePage("options.html", webInterface, loaders, templateRenderer, pageTitleKey = "Page.Options.Title") { +@ToadletPath("options.html") +class OptionsPage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) : + 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 }