From 165b62acc991cbf30cb721af27b04a066dbc9413 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Sun, 1 Dec 2019 09:22:20 +0100 Subject: v2rw: Convert thread display + poll voting I did not reimplement the 'poll_recast' and 'poll_preview' settings, these actions are now always permitted. Updated CSS a little bit to highlight the linked post and fix the double border at the bottom. The nice thing about the sql_visible_threads() function I wrote earlier is that is can also be used for access control on a single thread. More code re-use. \o/ --- elm/Lib/Html.elm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'elm/Lib') diff --git a/elm/Lib/Html.elm b/elm/Lib/Html.elm index d75dced4..1e995f86 100644 --- a/elm/Lib/Html.elm +++ b/elm/Lib/Html.elm @@ -45,15 +45,15 @@ inputButton val onch attrs = -- Submit button with loading indicator and error message display -submitButton : String -> Api.State -> Bool -> Bool -> Html m -submitButton val state valid load = div [] - [ input [ type_ "submit", class "submit", tabindex 10, value val, disabled (state == Api.Loading || not valid || load) ] [] +submitButton : String -> Api.State -> Bool -> Html m +submitButton val state valid = div [] + [ input [ type_ "submit", class "submit", tabindex 10, value val, disabled (state == Api.Loading || not valid) ] [] , case state of Api.Error r -> p [] [ b [class "standout" ] [ text <| Api.showResponse r ] ] _ -> if valid then text "" else p [] [ b [class "standout" ] [ text "The form contains errors, please fix these before submitting. " ] ] - , if state == Api.Loading || load + , if state == Api.Loading then div [ class "spinner" ] [] else text "" ] -- cgit v1.2.3