clean code

This commit is contained in:
pena 2022-12-06 01:00:39 +01:00 committed by Swrup
parent 9b1dbda081
commit 238e6fba75
10 changed files with 46 additions and 27 deletions

View file

@ -5,8 +5,6 @@ let csrf_tag request =
let token = Dream.csrf_token request in
input ~a:[ a_name "dream.csrf"; a_input_type `Hidden; a_value token ] ()
let make_input_text id = input ~a:[ a_id id; a_name id; a_input_type `Text ] ()
let make_form request ~action ~items =
(* TODO labels ...? *)
form ~a:[ a_action action; a_method `Post ] (csrf_tag request :: items)