Link-Buttons via CSS
This commit is contained in:
parent
05b912179f
commit
52be9e3198
@ -233,7 +233,8 @@ courseToForm cEntity = CourseForm
|
|||||||
course = entityVal cEntity
|
course = entityVal cEntity
|
||||||
|
|
||||||
newCourseForm :: Maybe CourseForm -> Form CourseForm
|
newCourseForm :: Maybe CourseForm -> Form CourseForm
|
||||||
newCourseForm template = identifyForm "newCourseForm" $ \html -> do
|
newCourseForm template = -- identifyForm "newCourseForm" $
|
||||||
|
\html -> do
|
||||||
-- mopt hiddenField
|
-- mopt hiddenField
|
||||||
-- cidKey <- getsYesod appCryptoIDKey
|
-- cidKey <- getsYesod appCryptoIDKey
|
||||||
-- courseId <- runMaybeT $ do
|
-- courseId <- runMaybeT $ do
|
||||||
|
|||||||
@ -68,12 +68,12 @@ instance Button StandardButton where
|
|||||||
-- LinkButton route = ???
|
-- LinkButton route = ???
|
||||||
|
|
||||||
linkButton :: Widget -> ButtonCssClass -> Route UniWorX -> Widget
|
linkButton :: Widget -> ButtonCssClass -> Route UniWorX -> Widget
|
||||||
linkButton lbl cls url = do
|
linkButton lbl cls url = [whamlet| <a href=@{url} .btn .#{bcc2txt cls} role=button>^{lbl} |]
|
||||||
[whamlet|
|
-- [whamlet|
|
||||||
<form method=post action=@{url}>
|
-- <form method=post action=@{url}>
|
||||||
<input type="hidden" name="_formid" value="identify-linkButton">
|
-- <input type="hidden" name="_formid" value="identify-linkButton">
|
||||||
<button .btn .#{bcc2txt cls} type=submit value="Link to @{url}">^{lbl}
|
-- <button .btn .#{bcc2txt cls} type=submit value="Link to @{url}">^{lbl}
|
||||||
|]
|
-- |]
|
||||||
-- <input .btn .#{bcc2txt cls} type="submit" value=^{lbl}>
|
-- <input .btn .#{bcc2txt cls} type="submit" value=^{lbl}>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user