Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Un-indent some instances of form-to

  • Loading branch information...
commit 9aae536ce73d3dd28f95c23b98419d3388772c93 1 parent 2b806e1
@amalloy amalloy authored
View
28 src/foreclojure/login.clj
@@ -13,20 +13,20 @@
(def-page my-login-page []
[:div.error (session/flash-get :error)]
(form-to [:post "/login"]
- [:table
- [:tr
- [:td (label :user "Username")]
- [:td (text-field :user)]]
- [:tr
- [:td (label :pwd "Password")]
- [:td (password-field :pwd)]]
- [:tr
- [:td]
- [:td [:button {:type "submit"} "Log In"]]]
- [:tr
- [:td ]
- [:td
- [:a {:href "/login/reset"} "Forgot your password?"]]]]))
+ [:table
+ [:tr
+ [:td (label :user "Username")]
+ [:td (text-field :user)]]
+ [:tr
+ [:td (label :pwd "Password")]
+ [:td (password-field :pwd)]]
+ [:tr
+ [:td]
+ [:td [:button {:type "submit"} "Log In"]]]
+ [:tr
+ [:td ]
+ [:td
+ [:a {:href "/login/reset"} "Forgot your password?"]]]]))
(defn do-login [user pwd]
(let [user (.toLowerCase user)
View
14 src/foreclojure/problems.clj
@@ -94,12 +94,12 @@
[:b "Enter your code:" [:br]
[:span {:class "error"} (session/flash-get :error)]]]
(form-to [:post "/run-code"]
- (text-area {:id "code-box"
- :spellcheck "false"}
- :code (session/flash-get :code))
- (hidden-field :id id)
- [:br]
- [:button.large {:type "submit"} "Run"])]))
+ (text-area {:id "code-box"
+ :spellcheck "false"}
+ :code (session/flash-get :code))
+ (hidden-field :id id)
+ [:br]
+ [:button.large {:type "submit"} "Run"])]))
(def-page problem-page []
[:div.congrats (session/flash-get :message)]
@@ -132,4 +132,4 @@
(GET "/problems" [] (problem-page))
(GET "/problem/:id" [id] (code-box id))
(POST "/run-code" {{:strs [id code]} :form-params}
- (run-code (Integer. id) code)))
+ (run-code (Integer. id) code)))
View
16 src/foreclojure/register.clj
@@ -10,14 +10,14 @@
(def-page register-page []
[:div.error (session/flash-get :error)]
(form-to [:post "/register"]
- [:table
- (map form-row
- [[text-field :user "Username (4-13 chars.)"]
- [password-field :pwd "Password (7-13 chars.)"]
- [password-field :repeat-pwd "Repeat Password"]
- [text-field :email "Email"]])
- [:tr
- [:td [:button {:type "submit"} "Register"]]]]))
+ [:table
+ (map form-row
+ [[text-field :user "Username (4-13 chars.)"]
+ [password-field :pwd "Password (7-13 chars.)"]
+ [password-field :repeat-pwd "Repeat Password"]
+ [text-field :email "Email"]])
+ [:tr
+ [:td [:button {:type "submit"} "Register"]]]]))
(defn do-register [user pwd repeat-pwd email]
(let [lower-user (.toLowerCase user)]
Please sign in to comment.
Something went wrong with that request. Please try again.