Link-Buttons via CSS

This commit is contained in:
SJost 2017-11-17 16:17:16 +01:00
parent 05b912179f
commit 52be9e3198
2 changed files with 8 additions and 7 deletions

View File

@ -233,7 +233,8 @@ courseToForm cEntity = CourseForm
course = entityVal cEntity
newCourseForm :: Maybe CourseForm -> Form CourseForm
newCourseForm template = identifyForm "newCourseForm" $ \html -> do
newCourseForm template = -- identifyForm "newCourseForm" $
\html -> do
-- mopt hiddenField
-- cidKey <- getsYesod appCryptoIDKey
-- courseId <- runMaybeT $ do

View File

@ -68,12 +68,12 @@ instance Button StandardButton where
-- LinkButton route = ???
linkButton :: Widget -> ButtonCssClass -> Route UniWorX -> Widget
linkButton lbl cls url = do
[whamlet|
<form method=post action=@{url}>
<input type="hidden" name="_formid" value="identify-linkButton">
<button .btn .#{bcc2txt cls} type=submit value="Link to @{url}">^{lbl}
|]
linkButton lbl cls url = [whamlet| <a href=@{url} .btn .#{bcc2txt cls} role=button>^{lbl} |]
-- [whamlet|
-- <form method=post action=@{url}>
-- <input type="hidden" name="_formid" value="identify-linkButton">
-- <button .btn .#{bcc2txt cls} type=submit value="Link to @{url}">^{lbl}
-- |]
-- <input .btn .#{bcc2txt cls} type="submit" value=^{lbl}>