forked from Adleraci/adlerka.top
Add survey
This commit is contained in:
parent
8ae319ec62
commit
1e526fd38a
@ -716,14 +716,19 @@ async function surveySubmit() {
|
|||||||
const satisfaction = document.querySelector('input[name="satisfaction"]:checked');
|
const satisfaction = document.querySelector('input[name="satisfaction"]:checked');
|
||||||
const functionality = document.querySelector('input[name="functionality"]:checked');
|
const functionality = document.querySelector('input[name="functionality"]:checked');
|
||||||
const content = document.querySelector('input[name="content"]:checked');
|
const content = document.querySelector('input[name="content"]:checked');
|
||||||
const comment = document.querySelector('textarea[name="comment"]').value;
|
const comment = document.querySelector('textarea[name="comment"]');
|
||||||
if (satisfaction && functionality && content && comment) {
|
if (satisfaction && functionality && content && comment.value) {
|
||||||
doAction("/survey", {
|
await doAction("/survey", {
|
||||||
action: "surveySubmit",
|
action: "surveySubmit",
|
||||||
satisfaction: satisfaction.value,
|
satisfaction: satisfaction.value,
|
||||||
functionality: functionality.value,
|
functionality: functionality.value,
|
||||||
content: content.value,
|
content: content.value,
|
||||||
comment: comment
|
comment: comment.value
|
||||||
});
|
}, "Zaznamenané",
|
||||||
|
"Nastala chyba");
|
||||||
|
satisfaction.checked = false;
|
||||||
|
functionality.checked = false;
|
||||||
|
content.checked = false;
|
||||||
|
comment.value = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user