module Lucienne.View.AddNewUser (addNewUser) where import Text.Blaze ((!)) import qualified Text.Blaze.Html4.Strict as H import qualified Text.Blaze.Html4.Strict.Attributes as A import Lucienne.View.Common (Errors,template,stringHtml,form) import qualified Lucienne.Url as Url addNewUser :: Errors -> H.Html addNewUser errors = template "Add new user" [] errors $ form Url.doAddNewUser $ H.fieldset $ do H.legend "Add new user" H.table $ do H.tr $ do H.td $ H.label ! A.for "username" $ stringHtml "Username" H.td $ H.input ! A.type_ "input" ! A.name "username" ! A.value "" H.tr $ do H.td $ H.label ! A.for "password" $ stringHtml "Password" H.td $ H.input ! A.type_ "password" ! A.name "password" ! A.value "" H.tr $ do H.td $ H.label ! A.for "check_password" $ stringHtml "Password check" H.td $ H.input ! A.type_ "password" ! A.name "check_password" ! A.value "" H.tr $ do H.td $ H.label ! A.for "may_add_users" $ stringHtml "May add new users" H.td $ H.input ! A.type_ "checkbox" ! A.name "may_add_users" H.tr $ H.td ! A.colspan "2" $ H.input ! A.type_ "submit" ! A.value "Add"