From fb52851983ff5821f835cf2190209c0a6ff9c887 Mon Sep 17 00:00:00 2001 From: Akihito Terazawa Date: Fri, 14 Jul 2017 09:44:25 +0900 Subject: [PATCH] Sophisticated OAuth login form. --- .../job_streamer/console/components/root.cljs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/cljs/job_streamer/console/components/root.cljs b/src/cljs/job_streamer/console/components/root.cljs index c99b4b6..1b53780 100644 --- a/src/cljs/job_streamer/console/components/root.cljs +++ b/src/cljs/job_streamer/console/components/root.cljs @@ -397,13 +397,13 @@ [:button.ui.fluid.large.teal.submit.button{:type "submit"} "Login"]]]]] [:div.row [:div.column - [:div.ui.stacked.segment - (for [[id {:keys [name icon]}] oauth-providers] + [:div.ui.stacked.segments + (for [[id {:keys [name class-name]}] oauth-providers] [:div.ui.segment - [:form.ui.large.login.form - {:on-submit (fn [e] - (.preventDefault e) - (set! (.-href js/location) (api/url-for (str "/oauth/" id))))} - [:button.ui.fluid.large.teal.submit.button {:type "submit"} - [:i.icon {:class (or icon "openid")}] - (str "Login using " name)]]])]]]]]]))) + [:button.ui.fluid.large.button {:class (or class-name "teal") + :on-click (fn [e] + (.preventDefault e) + (set! (.-href js/location) (api/url-for (str "/oauth/" id))))} + [:i.icon {:class (or class-name "openid")}] + (str "Login using " name)]])]]]]]]))) +