25 lines
843 B
HTML
25 lines
843 B
HTML
|
|
let f ?nick ?password request =
|
||
|
|
|
||
|
|
% begin match nick, password with
|
||
|
|
% | Some nick, Some password ->
|
||
|
|
% begin match User.login ~nick ~password with
|
||
|
|
% | Error e ->
|
||
|
|
Error: <%s e %>
|
||
|
|
% | Ok () ->
|
||
|
|
Logged in ! Happy planting XD
|
||
|
|
% end;
|
||
|
|
% | _ ->
|
||
|
|
<%s! Dream.form_tag ~action:"/login" request %>
|
||
|
|
<div class="mb-3">
|
||
|
|
<label for="nick" class="form-label">Nick</label>
|
||
|
|
<input name="nick" type="text" class="form-control" id="nick" aria-describedby="nickHelp">
|
||
|
|
<div id="nickHelp" class="form-text">Who are u ?</div>
|
||
|
|
</div>
|
||
|
|
<div class="mb-3">
|
||
|
|
<label for="password" class="form-label">Password</label>
|
||
|
|
<input name="password" type="password" class="form-control" id="password">
|
||
|
|
</div>
|
||
|
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||
|
|
</form>
|
||
|
|
% end;
|