better input file button

This commit is contained in:
Swrup 2022-05-29 15:52:55 +02:00
parent 0af4a9fa29
commit 9257cd25d2
3 changed files with 12 additions and 5 deletions

View file

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

View file

@ -17,10 +17,11 @@ let f thread_id request =
<%s! checkboxes %> <%s! checkboxes %>
<input name="tags" type="text" class="form-control" id="tags" aria-labelledby="tags-label" /> <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> <label for="file" id="file-label" class="form-label">Add picture</label>
<input id="file" name="file" aria-describedby="file-label" type="file" accept="image/png,image/jpeg,image/webp,image/gif"> <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" /> <input name="alt" type="text" class="form-control off" id="alt" aria-labelledby="alt-label" />
% begin match thread_id with % begin match thread_id with
% | None -> % | None ->

View file

@ -32,7 +32,9 @@ let f (user: User.t) request =
<br /> <br />
<br /> <br />
<%s! Dream.form_tag ~action:"/profile" ~enctype:`Multipart_form_data request %> <%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 /> <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> </form>