use textarea for bio
This commit is contained in:
parent
e502ec9584
commit
b7642d3c54
1 changed files with 6 additions and 6 deletions
|
|
@ -1,9 +1,9 @@
|
||||||
let f ?bio request =
|
let f ?bio request =
|
||||||
% begin match Dream.session "nick" request with
|
% begin match Dream.session "nick" request with
|
||||||
% | None ->
|
% | None ->
|
||||||
not logged in
|
not logged in
|
||||||
% | Some nick ->
|
% | Some nick ->
|
||||||
%begin match bio with
|
%begin match bio with
|
||||||
% | None ->
|
% | None ->
|
||||||
% let bio = match User.get_bio nick with
|
% let bio = match User.get_bio nick with
|
||||||
% | Ok bio -> bio
|
% | Ok bio -> bio
|
||||||
|
|
@ -13,16 +13,16 @@ not logged in
|
||||||
<%s! Dream.form_tag ~action:"/profile" request %>
|
<%s! Dream.form_tag ~action:"/profile" request %>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="bio" class="form-label">Bio</label>
|
<label for="bio" class="form-label">Bio</label>
|
||||||
<input name="bio" type="text" class="form-control" id="bio" aria-describedby="bioHelp" value="<%s bio %>" </input>
|
<textarea name="bio" type="text" class="form-control" id="bio" aria-describedby="bioHelp" value="<%s bio %>"></textarea>
|
||||||
<div id="bioHelp" class="form-text">Who are you?</div>
|
<div id="bioHelp" class="form-text">Who are you?</div>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-primary">Save</button>
|
<button type="submit" class="btn btn-primary">Save</button>
|
||||||
</form>
|
</form>
|
||||||
% | Some bio ->
|
% | Some bio ->
|
||||||
% begin match User.update_bio bio nick with
|
% begin match User.update_bio bio nick with
|
||||||
% | Ok () ->
|
% | Ok () ->
|
||||||
Bio updated !
|
Bio updated !
|
||||||
% | Error e ->
|
% | Error e ->
|
||||||
<%s e %>
|
<%s e %>
|
||||||
% end;
|
% end;
|
||||||
% end;
|
% end;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue