|
18 | 18 | [valip.predicates :as pred])) |
19 | 19 |
|
20 | 20 | (defn register-form [{:keys [errors email username pgp-key]}] |
21 | | - (html-doc nil "Register" |
| 21 | + (html-doc "Register" {} |
22 | 22 | [:div.small-section |
23 | 23 | [:h1 "Register"] |
24 | 24 | (error-list errors) |
|
74 | 74 | (update-user-validations confirm))) |
75 | 75 |
|
76 | 76 | (defn profile-form [account user flash-msg & [errors]] |
77 | | - (html-doc account "Profile" |
| 77 | + (html-doc "Profile" {:account account} |
78 | 78 | [:div.small-section |
79 | 79 | (flash flash-msg) |
80 | 80 | [:h1 "Profile"] |
|
105 | 105 | :flash "Profile updated."))))) |
106 | 106 |
|
107 | 107 | (defn show-user [db account user] |
108 | | - (html-doc account (user :user) |
| 108 | + (html-doc (user :user) {:account account} |
109 | 109 | [:div.light-article.row |
110 | 110 | [:h1.col-md-12.col-sm-12.col-xs-12.col-lg-12 |
111 | 111 | (user :user)] |
|
117 | 117 | (unordered-list (map group-link (find-groupnames db (user :user))))]])) |
118 | 118 |
|
119 | 119 | (defn forgot-password-form [] |
120 | | - (html-doc nil "Forgot password?" |
| 120 | + (html-doc "Forgot password?" {} |
121 | 121 | [:div.small-section |
122 | 122 | [:h1 "Forgot password?"] |
123 | 123 | (form-to [:post "/forgot-password"] |
|
140 | 140 | reset-password-url] |
141 | 141 | (interpose "\n\n") |
142 | 142 | (apply str))))) |
143 | | - (html-doc nil "Forgot password?" |
| 143 | + (html-doc "Forgot password?" {} |
144 | 144 | [:h1 "Forgot password?"] |
145 | 145 | [:p "If your account was found, you should get an email with a link to reset your password soon."])) |
146 | 146 |
|
147 | 147 | (defn edit-password-form [db reset-code & [errors]] |
148 | 148 | (if-let [user (db/find-user-by-password-reset-code db reset-code)] |
149 | | - (html-doc nil "Reset your password" |
| 149 | + (html-doc "Reset your password" {} |
150 | 150 | [:div.small-section |
151 | 151 | [:h1 "Reset your password"] |
152 | 152 | (error-list errors) |
|
164 | 164 | :required true} |
165 | 165 | :confirm) |
166 | 166 | (submit-button "Update my password"))]) |
167 | | - (html-doc nil "Reset your password" |
| 167 | + (html-doc "Reset your password" {} |
168 | 168 | [:h1 "Reset your password"] |
169 | 169 | [:p "The reset code was not found. Please ask for a new code in the " [:a {:href "/forgot-password"} "forgot password"] " page"]))) |
170 | 170 |
|
|
0 commit comments