Better auto initialization method for forms and resource displays

This commit is contained in:
Patrick Jentsch
2023-10-09 14:21:31 +02:00
parent 1b974f0bbc
commit e20dd01710
10 changed files with 42 additions and 26 deletions

View File

@@ -1,10 +1,5 @@
Forms.CreateContributionForm = class CreateContributionForm extends Forms.BaseForm {
static autoInit() {
let createContributionFormElements = document.querySelectorAll('.create-contribution-form');
for (let createContributionFormElement of createContributionFormElements) {
new Forms.CreateContributionForm(createContributionFormElement);
}
}
static htmlClass = 'create-contribution-form';
constructor(formElement) {
super(formElement);