better input file button

This commit is contained in:
Swrup 2022-05-29 15:52:55 +02:00
parent 2c4d2bd83d
commit f0f7a7b49a
3 changed files with 12 additions and 5 deletions

View file

@ -163,3 +163,7 @@ a.post-menu-link {
width: auto;
float: right;
}
#submit-button {
float: right;
}

View file

@ -17,10 +17,11 @@ let f thread_id request =
<%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="file" id="file-label" class="form-label">Add picture</label>
<input id="file" class="form-control" name="file" aria-describedby="file-label" type="file" accept="image/png,image/jpeg,image/webp,image/gif">
<br />
<label for="alt" id="alt-label" class="form-label off">Image description:</label>
<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 ->

View file

@ -32,7 +32,9 @@ let f (user: User.t) request =
<br />
<br />
<%s! Dream.form_tag ~action:"/profile" ~enctype:`Multipart_form_data request %>
<input id="file" name="file" aria-describedby="file-label" type="file" accept="image/png,image/jpeg,image/webp,image/gif">
<br />
<button class="btn btn-primary">Submit picture!</button>
<label for="file" id="file-label" class="form-label">Change avatar</label>
<input id="file" class="form-control" name="file" aria-describedby="file-label" type="file" accept="image/png,image/jpeg,image/webp,image/gif">
<br />
<button class="btn btn-primary">Submit avatar!</button>
</form>