Add support for magazines, backend only (#53)

* Initial work to support magazines

* Change editor default height to 300px from 500px

* Stabilize the magazine repository app

* Switch from stacked to tabular inlines for magazines

* Update submodules
This commit is contained in:
2025-12-08 23:18:57 +01:00
committed by GitHub
parent 3804c3379b
commit 6b10051bc4
12 changed files with 554 additions and 11 deletions

View File

@@ -0,0 +1,16 @@
document.addEventListener('formset:added', function(event) {
const newForm = event.target; // the new inline form element
const defaultLanguage = document.querySelector('#id_language').value;
const defaultStatus = document.querySelector('#id_published').checked;
const languageInput = newForm.querySelector('select[name$="language"]');
const statusInput = newForm.querySelector('input[name$="published"]');
if (languageInput) {
languageInput.value = defaultLanguage;
}
if (statusInput) {
statusInput.checked = defaultStatus;
}
});