collected static files

This commit is contained in:
CDaut 2022-11-12 00:56:34 +01:00 committed by CDaut
parent 2ecf1e8f65
commit 71d96f294f
9730 changed files with 437140 additions and 821 deletions

View file

@ -0,0 +1,16 @@
'use strict';
{
const inputTags = ['BUTTON', 'INPUT', 'SELECT', 'TEXTAREA'];
const modelName = document.getElementById('django-admin-form-add-constants').dataset.modelName;
if (modelName) {
const form = document.getElementById(modelName + '_form');
for (const element of form.elements) {
// HTMLElement.offsetParent returns null when the element is not
// rendered.
if (inputTags.includes(element.tagName) && !element.disabled && element.offsetParent) {
element.focus();
break;
}
}
}
}