Commit 5a908f98 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Make the login-admin page and the login-dummy page distinct

parent d0dc81dd
...@@ -339,7 +339,7 @@ let () = Eliom_registration.Html5.register ...@@ -339,7 +339,7 @@ let () = Eliom_registration.Html5.register
) >> ) >>
Services.get ()) Services.get ())
in in
Templates.dummy_login ~auth_systems ~service Templates.string_login ~auth_systems ~service ~kind:`Dummy
) else fail_http 404 ) else fail_http 404
) )
...@@ -396,7 +396,7 @@ let () = Eliom_registration.Html5.register ...@@ -396,7 +396,7 @@ let () = Eliom_registration.Html5.register
) else forbidden () ) else forbidden ()
) )
in in
Templates.dummy_login ~auth_systems ~service Templates.string_login ~auth_systems ~service ~kind:`Admin
) )
let next_lf str i = let next_lf str i =
......
...@@ -153,14 +153,18 @@ let index ~auth_systems ~featured = ...@@ -153,14 +153,18 @@ let index ~auth_systems ~featured =
] in ] in
base ~auth_systems ~title:site_title ~content base ~auth_systems ~title:site_title ~content
let dummy_login ~service = let string_login ~kind ~service =
let title, field_name, input_type = match kind with
| `Dummy -> "Dummy login", "Username:", `Text
| `Admin -> "Admin login", "Admin password:", `Password
in
let form = post_form ~service let form = post_form ~service
(fun name -> (fun name ->
[ [
tablex [tbody [ tablex [tbody [
tr [ tr [
th [label ~a:[a_for name] [pcdata "Username:"]]; th [label ~a:[a_for name] [pcdata field_name]];
td [string_input ~a:[a_maxlength 50] ~input_type:`Text ~name ()]; td [string_input ~a:[a_maxlength 50] ~input_type ~name ()];
]] ]]
]; ];
div [ div [
...@@ -169,10 +173,10 @@ let dummy_login ~service = ...@@ -169,10 +173,10 @@ let dummy_login ~service =
]) () ]) ()
in in
let content = [ let content = [
h1 [pcdata "Login"]; h1 [pcdata title];
form; form;
] in ] in
base ~title:"Login" ~content base ~title ~content
let password_login ~service = let password_login ~service =
let form = post_form ~service let form = post_form ~service
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment