Link-Buttons via CSS
This commit is contained in:
parent
05b912179f
commit
52be9e3198
@ -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
|
||||
|
||||
@ -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}>
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user