[rentals] Clear locker forms when dropdown menus are closed

This commit is contained in:
Adam Goldsmith 2022-05-05 17:07:30 -04:00
parent a0962efe07
commit 8eba17af13

View File

@ -117,3 +117,12 @@
</div> </div>
{% endfor %} {% endfor %}
{% endblock %} {% endblock %}
{% block footer %}
<script type="text/javascript" src="{% static 'admin/js/vendor/jquery/jquery.js' %}"></script>
<script>
// reset form when dropdown menu is closed
document.addEventListener('hide.bs.dropdown', (e) => {
e.target.parentElement.querySelector('.dropdown-menu form').reset();
});
</script>
{% endblock %}