postNewSupplierR :: Handler Html
postNewSupplierR = do
  ((res, _), _) <- runFormPost
    $ renderBootstrap3 BootstrapBasicForm newSupplierForm
  case res of
    FormSuccess sup -> do
      runDB $ insert_ sup
      setMessageI MsgSupplierCreated
      redirect SupplierR
    _ -> do
      setMessageI MsgSupplierNotCreated
      redirect SupplierR
postNewSupplierR :: Handler Html
postNewSupplierR = do
  ((res, _), _) <- runFormPost
    $ renderBootstrap3 BootstrapBasicForm newSupplierForm
  case res of
    FormSuccess sup -> do
      runDB $ insert_ sup
      setMessageI MsgSupplierCreated
      redirect SupplierR
    _ -> do
      setMessageI MsgSupplierNotCreated
      redirect SupplierR
postNewSupplierR = do
  ((res, _), _) <- runFormPost
    $ renderBootstrap3 BootstrapBasicForm newSupplierForm
  case res of
    FormSuccess sup -> do
      runDB $ insert_ sup
      setMessageI MsgSupplierCreated
      redirect SupplierR
    _ -> do
      setMessageI MsgSupplierNotCreated
      redirect SupplierR