module Web.View.AnnotationThreads.New where
import Web.Types
import Generated.Types
import IHP.Prelude
import IHP.ViewPrelude
data NewView = NewView
{ widget :: !Widget
, thread :: !AnnotationThread
}
instance View NewView where
html NewView { .. } = [hsx|
New Annotation Thread
{renderForm thread widget.id}
|]
renderForm :: AnnotationThread -> Id Widget -> Html
renderForm thread widgetId = formFor thread [hsx|
{(textField #title) { fieldLabel = "Title" }}
{(textareaField #description) { fieldLabel = "Description (optional)" }}
{submitButton}
|]