'update'
[vchess.git] / client / src / components / ContactForm.vue
index 2f970ae..3f97f59 100644 (file)
@@ -1,7 +1,8 @@
 <template lang="pug">
 div
   input#modalContact.modal(type="checkbox")
-  div(role="dialog" aria-labelledby="contactTitle")
+  div(role="dialog" data-checkbox="modalContact"
+      aria-labelledby="contactTitle")
     form.card.smallpad
       label.modal-close(for="modalContact")
       h3#contactTitle.section {{ st.tr["Contact form"] }}
@@ -12,7 +13,7 @@ div
         label(for="mailSubject") {{ st.tr["Subject"] }}
         input#mailSubject(type="text")
       fieldset
-        label(for="mailContent") {{ st.tr["Content"] }}
+        label(for="mailContent") {{ st.tr["Content"] }} *
         br
         textarea#mailContent
       fieldset
@@ -33,7 +34,7 @@ export default {
     };
   },
   methods: {
-               // Note: not using Vue here, but would be possible
+    // Note: not using Vue here, but would be possible
     trySendMessage: function() {
       let email = document.getElementById("userEmail");
       let subject = document.getElementById("mailSubject");
@@ -42,8 +43,8 @@ export default {
       if (!!error)
         return alert(error);
       if (content.value.trim().length == 0)
-        return alert("Empty message");
-      if (subject.value.trim().length == 0 && !confirm("No subject. Send anyway?"))
+        return alert(this.st.tr["Empty message"]);
+      if (subject.value.trim().length == 0 && !confirm(this.st.tr["No subject. Send anyway?"]))
         return;
 
       // Message sending:
@@ -64,11 +65,12 @@ export default {
         }
       );
     },
-       },
+  },
 };
 </script>
 
 <style lang="sass" scoped>
 #emailSent
+  color: blue
   display: none
 </style>