mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-12 17:10:41 +00:00
Contribution Package Tesseract OCR
This commit is contained in:
18
app/static/js/Forms/CreateContributionForm.js
Normal file
18
app/static/js/Forms/CreateContributionForm.js
Normal file
@ -0,0 +1,18 @@
|
||||
class CreateContributionForm extends Form {
|
||||
static autoInit() {
|
||||
let createContributionFormElements = document.querySelectorAll('.create-contribution-form');
|
||||
for (let createContributionFormElement of createContributionFormElements) {
|
||||
new CreateContributionForm(createContributionFormElement);
|
||||
}
|
||||
}
|
||||
|
||||
constructor(formElement) {
|
||||
super(formElement);
|
||||
|
||||
this.addEventListener('requestLoad', (event) => {
|
||||
if (event.target.status === 201) {
|
||||
window.location.href = event.target.getResponseHeader('Location');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
class Form {
|
||||
static autoInit() {
|
||||
CreateContributionForm.autoInit();
|
||||
CreateCorpusFileForm.autoInit();
|
||||
CreateJobForm.autoInit();
|
||||
}
|
||||
|
Reference in New Issue
Block a user