aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/assets/scripts.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-09-28 16:40:28 +0300
committerGravatar Vitaly Takmazov2018-09-28 16:40:28 +0300
commit9e65c2c366968456e57a90cb6fc3eebd7b79b355 (patch)
tree77fc1142477521be1c0989850638f7eba5bbc324 /juick-server/src/main/assets/scripts.js
parent7366c3e536e329c3dba6edc82fb80bf7e271359f (diff)
fix pm forms
Diffstat (limited to 'juick-server/src/main/assets/scripts.js')
-rw-r--r--juick-server/src/main/assets/scripts.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/juick-server/src/main/assets/scripts.js b/juick-server/src/main/assets/scripts.js
index 556fbf32..f2b7600e 100644
--- a/juick-server/src/main/assets/scripts.js
+++ b/juick-server/src/main/assets/scripts.js
@@ -701,8 +701,7 @@ ready(function () {
});
});
}
- var pmmsg = document.getElementById('pmmsg');
- if (pmmsg) {
+ document.querySelectorAll('.pmmsg').forEach(pmmsg => {
pmmsg.addEventListener('submit', e => {
e.preventDefault();
let formData = new FormData(pmmsg);
@@ -726,7 +725,7 @@ ready(function () {
alert(error.message);
});
});
- }
+ });
document.querySelectorAll('.msg-menu').forEach(function (el) {
el.addEventListener('click', function (e) {