Pre-select plan when adding update from toolbar

This commit is contained in:
Stefan Wehrmeyer 2022-03-17 09:18:45 +01:00
parent e6fec572a8
commit 14d7f2b249
2 changed files with 12 additions and 0 deletions

View file

@ -0,0 +1,11 @@
{% extends "admin/change_form.html" %}
{% block after_field_sets %}
{% if not original.pk %}
<script>
(function(){
document.getElementById('id_plan').value = new URLSearchParams(window.location.search).get("plan") || ""
}())
</script>
{% endif %}
{% endblock %}