add post_form.eml.html
This commit is contained in:
parent
a91c50c428
commit
4a5361c61a
7 changed files with 48 additions and 48 deletions
33
src/post_form.eml.html
Normal file
33
src/post_form.eml.html
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
let f thread_id request =
|
||||
% let action = match thread_id with |None -> "/" | Some id -> Format.sprintf "/thread/%s" id in
|
||||
% let checkboxes = match thread_id with |None -> Format.asprintf "%a" Pp_babillard.pp_checkboxes () | Some _id -> "" in
|
||||
<div class="post-form">
|
||||
<%s! Dream.form_tag ~action ~enctype:`Multipart_form_data request %>
|
||||
% begin if Option.is_none thread_id then
|
||||
<input type="hidden" id="lat-input" name="lat-input">
|
||||
<input type="hidden" id="lng-input" name="lng-input">
|
||||
|
||||
<label for="subject" id="subject-label" class="form-label">Subject</label>
|
||||
<input name="subject" type="text" class="form-control" id="subject" aria-labelledby="subject-label" />
|
||||
% end;
|
||||
<label for="comment" id="comment-label" class="form-label">Comment</label>
|
||||
<textarea name="comment" type="text" class="form-control" id="comment" aria-labelledby="comment-label"></textarea>
|
||||
|
||||
<label for="tags" id="tags-label" class="form-label">Tags</label>
|
||||
<%s! checkboxes %>
|
||||
<input name="tags" type="text" class="form-control" id="tags" aria-labelledby="tags-label" />
|
||||
|
||||
<label for="file" id="file-label" class="form-label">Picture:</label>
|
||||
<input id="file" name="file" aria-describedby="file-label" type="file" accept="image/png,image/jpeg,image/webp,image/gif">
|
||||
|
||||
<label for="alt" id="alt-label" class="form-label off">Image description:</label>
|
||||
<input name="alt" type="text" class="form-control off" id="alt" aria-labelledby="alt-label" />
|
||||
% begin match thread_id with
|
||||
% | None ->
|
||||
<br />
|
||||
<button type="submit" class="btn btn-primary" id="submit-button" disabled>Make Thread</button>
|
||||
% | Some _id ->
|
||||
<button type="submit" class="btn btn-primary" id="submit-button">Reply</button>
|
||||
% end;
|
||||
</form>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue