{% extends 'admin/change_form.html' %}
{% load static sptags %}
{% block content %}
    {{ block.super }}
    <script type="text/javascript" src="{% static 'admin/simplepro/js/pegged.js' %}?_={% get_sp_version %}"></script>
    <script type="text/javascript">
        window.addEventListener('load', () => {
            var selects = document.getElementsByTagName('select');
            var pegged = new Pegged();
            for (var s in selects) {
                pegged.registerSelect(selects[s], 'small');
            }

            var checkboxs = document.querySelectorAll('*[type="checkbox"]');
            for(var c in checkboxs){
                pegged.registerBoolean(checkboxs[c]);
            }
        });
    </script>
{% endblock %}