use textarea for bio
This commit is contained in:
parent
302525f2ab
commit
3487a47511
1 changed files with 6 additions and 6 deletions
|
|
@ -1,9 +1,9 @@
|
|||
let f ?bio request =
|
||||
% begin match Dream.session "nick" request with
|
||||
% | None ->
|
||||
% | None ->
|
||||
not logged in
|
||||
% | Some nick ->
|
||||
%begin match bio with
|
||||
%begin match bio with
|
||||
% | None ->
|
||||
% let bio = match User.get_bio nick with
|
||||
% | Ok bio -> bio
|
||||
|
|
@ -13,16 +13,16 @@ not logged in
|
|||
<%s! Dream.form_tag ~action:"/profile" request %>
|
||||
<div class="mb-3">
|
||||
<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>
|
||||
<button type="submit" class="btn btn-primary">Save</button>
|
||||
</form>
|
||||
% | Some bio ->
|
||||
% | Some bio ->
|
||||
% begin match User.update_bio bio nick with
|
||||
% | Ok () ->
|
||||
% | Ok () ->
|
||||
Bio updated !
|
||||
% | Error e ->
|
||||
% | Error e ->
|
||||
<%s e %>
|
||||
% end;
|
||||
% end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue