Remove version change handling in templates as it is already implemented in CreateJobForm.js

This commit is contained in:
Patrick Jentsch 2022-10-04 15:32:31 +02:00
parent 0e982e0749
commit 40348cebe1
2 changed files with 3 additions and 29 deletions

View File

@ -123,15 +123,3 @@
</div> </div>
</div> </div>
{% endblock modals %} {% endblock modals %}
{% block scripts %}
{{ super() }}
<script>
let versionField = document.querySelector('#add-job-form-version');
versionField.addEventListener('change', (event) => {
let url = new URL(window.location.href);
url.search = `?version=${event.target.value}`;
window.location.href = url.toString();
});
</script>
{% endblock scripts %}

View File

@ -159,14 +159,12 @@
<ul class="collapsible popout" id="transkribus-htr-models"> <ul class="collapsible popout" id="transkribus-htr-models">
{% for m in transkribus_htr_models %} {% for m in transkribus_htr_models %}
<li id="transkribus-htr-model-{{ m.hashid }}"> <li id="transkribus-htr-model-{{ m.hashid }}">
<div class="collapsible-header"><i class="material-icons">widgets</i>{{ m.transkribus_name }}</div> {% for m_info in TRANSKRIBUS_HTR_MODELS if m_info['modelId'] == m.transkribus_model_id %}
<div class="collapsible-header"><i class="material-icons">widgets</i>{{ m_info.name }}</div>
<div class="collapsible-body"> <div class="collapsible-body">
{% for m_info in TRANSKRIBUS_HTR_MODELS %}
{% if m_info['modelId'] == m.transkribus_model_id %}
{{ m_info|tojson }} {{ m_info|tojson }}
{% endif %}
{% endfor %}
</div> </div>
{% endfor %}
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
@ -188,15 +186,3 @@
</div> </div>
</div> </div>
{% endblock modals %} {% endblock modals %}
{% block scripts %}
{{ super() }}
<script>
let versionField = document.querySelector('#add-job-form-version');
versionField.addEventListener('change', (event) => {
let url = new URL(window.location.href);
url.search = `?version=${event.target.value}`;
window.location.href = url.toString();
});
</script>
{% endblock scripts %}