projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplify Game logic a bit + some advances on Chakart
[vchess.git]
/
client
/
src
/
components
/
ContactForm.vue
diff --git
a/client/src/components/ContactForm.vue
b/client/src/components/ContactForm.vue
index
f9c5c60
..
e5d2732
100644
(file)
--- a/
client/src/components/ContactForm.vue
+++ b/
client/src/components/ContactForm.vue
@@
-4,7
+4,7
@@
div
type="checkbox"
@change="trySetEnterTime($event)"
)
type="checkbox"
@change="trySetEnterTime($event)"
)
- div(
+ div
#contactDiv
(
role="dialog"
data-checkbox="modalContact"
)
role="dialog"
data-checkbox="modalContact"
)
@@
-23,9
+23,10
@@
div
</template>
<script>
</template>
<script>
-import { ajax } from "
..
/utils/ajax";
+import { ajax } from "
@
/utils/ajax";
import { store } from "@/store";
import { checkNameEmail } from "@/data/userCheck";
import { store } from "@/store";
import { checkNameEmail } from "@/data/userCheck";
+import { processModalClick } from "@/utils/modalClick.js";
export default {
name: "my-contact-form",
data: function() {
export default {
name: "my-contact-form",
data: function() {
@@
-35,6
+36,10
@@
export default {
infoMsg: ""
};
},
infoMsg: ""
};
},
+ mounted: function() {
+ document.getElementById("contactDiv")
+ .addEventListener("click", processModalClick);
+ },
methods: {
trySetEnterTime: function(event) {
if (event.target.checked) {
methods: {
trySetEnterTime: function(event) {
if (event.target.checked) {
@@
-66,14
+71,17
@@
export default {
"/messages",
"POST",
{
"/messages",
"POST",
{
- email: email.value,
- subject: subject.value,
- content: content.value
- },
- () => {
- this.infoMsg = "Email sent!";
- subject.value = "";
- content.value = "";
+ nocredentials: true,
+ data: {
+ email: email.value,
+ subject: subject.value,
+ content: content.value
+ },
+ success: () => {
+ this.infoMsg = "Email sent!";
+ subject.value = "";
+ content.value = "";
+ }
}
);
}
}
);
}