Skip to content

Commit

Permalink
fix(checkout): mark accessory as optional field (#53)
Browse files Browse the repository at this point in the history
* fix(checkin): autofocus on asset field

* fix(checkout): mark accessory as optional field
  • Loading branch information
drahamim authored May 26, 2023
1 parent 6b6da34 commit 761e39c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/invenflask/templates/checkin.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@

{% block content %}
<h1>{% block title %} Checkin Asset {% endblock %}</h1>
<script>
window.onload = function () {
document.getElementById("id").focus();
};
</script>
<fieldset>
<form method="POST">
<div class="form-group">
<label class="form-lable mt-4" for="title">ID</label>
<br>
<input type="text" name="id"
placeholder="Asset ID"
placeholder="Asset ID" id="id"
value="{{ request.form['id'] }}"></input>
<br>
<button type="submit" class="btn btn-primary btn-lg">Checkin</button>
Expand Down
2 changes: 1 addition & 1 deletion src/invenflask/templates/checkout.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h1>{% block title %} Checkout Asset {% endblock %}</h1>
onkeypress="return runScript1(event);"></input>
<br>

<label for="title">Accessory</label>
<label for="title">Accessory (Optional)</label>
<br>
<input type="text" id="accessory" name="accessoryid" placeholder="Accessory ID"
value="{{ request.form['accessoryid'] }}" autocomplete="off"></input>
Expand Down

0 comments on commit 761e39c

Please sign in to comment.