Banner.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. <template>
  2. <LayoutContainer>
  3. <LayoutUITitlePage
  4. title="Besoin d'aide ?"
  5. subtitle="Notre équipe est là pour vous. contactez-nous!. "
  6. />
  7. <v-row>
  8. <v-col cols="12" style="position: relative">
  9. <img
  10. src="/images/formation/banner.jpg"
  11. alt="line"
  12. class="cover-image"
  13. />
  14. </v-col>
  15. </v-row>
  16. <div class="container-contact">
  17. <v-form ref="form" v-model="valid" lazy-validation>
  18. <v-container>
  19. <h4 class="title-h4">Veuillez remplir le formulaire ci-dessous</h4>
  20. <h6 class="infos">Vos coordonnées</h6>
  21. <!-- Gender selection in one row -->
  22. <v-row>
  23. <v-col cols="12">
  24. <v-radio-group v-model="gender" row mandatory inline>
  25. <v-radio label="Madame" value="Madame"></v-radio>
  26. <v-radio label="Monsieur" value="Monsieur"></v-radio>
  27. </v-radio-group>
  28. </v-col>
  29. </v-row>
  30. <!-- Name and Surname on the same line -->
  31. <v-row>
  32. <v-col cols="12" md="6">
  33. <v-text-field
  34. v-model="name"
  35. :rules="nameRules"
  36. label="Nom*"
  37. required
  38. ></v-text-field>
  39. </v-col>
  40. <v-col cols="12" md="6">
  41. <v-text-field
  42. v-model="surname"
  43. :rules="surnameRules"
  44. label="Prénom*"
  45. required
  46. ></v-text-field>
  47. </v-col>
  48. </v-row>
  49. <!-- Postal code and city on the same line -->
  50. <v-row>
  51. <v-col cols="12" md="6">
  52. <v-text-field
  53. v-model="postalCode"
  54. label="Code postal"
  55. type="number"
  56. ></v-text-field>
  57. </v-col>
  58. <v-col cols="12" md="6">
  59. <v-text-field v-model="city" label="Ville"></v-text-field>
  60. </v-col>
  61. </v-row>
  62. <!-- Email and phone on the same line -->
  63. <v-row>
  64. <v-col cols="12" md="6">
  65. <v-text-field
  66. v-model="email"
  67. :rules="emailRules"
  68. label="Email*"
  69. required
  70. type="email"
  71. ></v-text-field>
  72. </v-col>
  73. <v-col cols="12" md="6">
  74. <v-text-field
  75. v-model="phone"
  76. label="Téléphone"
  77. type="tel"
  78. ></v-text-field>
  79. </v-col>
  80. </v-row>
  81. <!-- Structure name on its own line -->
  82. <v-row>
  83. <v-col cols="12">
  84. <v-text-field
  85. v-model="structureName"
  86. :rules="structureNameRules"
  87. label="Nom de la structure*"
  88. required
  89. ></v-text-field>
  90. </v-col>
  91. </v-row>
  92. <h6 class="infos">Votre demande concerne</h6>
  93. <!-- Request type and product concerned on the same line -->
  94. <v-row>
  95. <v-col cols="12" md="6">
  96. <v-select
  97. v-model="requestType"
  98. :items="requestTypes"
  99. label="Votre demande concerne"
  100. outlined
  101. dense
  102. ></v-select>
  103. </v-col>
  104. <v-col cols="12" md="6">
  105. <v-text-field
  106. v-model="concernedProduct"
  107. label="Le produit concerné"
  108. outlined
  109. dense
  110. ></v-text-field>
  111. </v-col>
  112. </v-row>
  113. <h6 class="infos">Votre message</h6>
  114. <!-- Message on its own line -->
  115. <v-row>
  116. <v-col cols="12">
  117. <v-textarea
  118. v-model="message"
  119. :rules="messageRules"
  120. label="Votre message*"
  121. required
  122. outlined
  123. dense
  124. maxlength="400"
  125. ></v-textarea>
  126. </v-col>
  127. </v-row>
  128. <!-- Policy and checkboxes -->
  129. <v-row>
  130. <v-col cols="12">
  131. <v-checkbox
  132. v-model="privacyPolicy"
  133. :rules="[(v) => !!v || 'You must accept the privacy policy']"
  134. label="J'ai pris connaissance de la politique de confidentialité et j'accepte le traitement de mes données personnelles par Opentalent."
  135. ></v-checkbox>
  136. </v-col>
  137. </v-row>
  138. <v-row>
  139. <v-col cols="12">
  140. <v-checkbox
  141. v-model="newsletterSubscription"
  142. label="Je souhaite recevoir des communications d'Opentalent par email (promotions, informations logiciel…). Je pourrai me désinscrire à tout moment."
  143. ></v-checkbox>
  144. </v-col>
  145. </v-row>
  146. <!-- Submit Button -->
  147. <v-row>
  148. <v-col cols="12">
  149. <v-btn :disabled="!valid" @click="submitForm"
  150. >Envoyer</v-btn
  151. >
  152. </v-col>
  153. </v-row>
  154. </v-container>
  155. </v-form>
  156. </div>
  157. </LayoutContainer>
  158. </template>
  159. <script setup>
  160. import { ref, reactive, computed, toRefs } from "vue";
  161. import { useRoute } from 'vue-router';
  162. const route = useRoute();
  163. const defaultRequestType = route.query.request;
  164. const name = ref("");
  165. const surname = ref("");
  166. const email = ref("");
  167. const structureName = ref("");
  168. const message = ref("");
  169. const privacyPolicy = ref(false);
  170. const gender = ref(null);
  171. const postalCode = ref(null);
  172. const city = ref("");
  173. const phone = ref(null);
  174. const concernedProduct = ref("");
  175. const newsletterSubscription = ref(false);
  176. const validateName = (name) => !!name || "Name is required";
  177. const validateSurname = (surname) => !!surname || "Surname is required";
  178. const validateEmail = (email) =>
  179. (!!email && /.+@.+\..+/.test(email)) || "E-mail must be valid";
  180. const validateStructureName = (structureName) =>
  181. !!structureName || "Structure name is required";
  182. const validateMessage = (message) =>
  183. (!!message && message.length <= 400) ||
  184. "Message cannot exceed 400 characters";
  185. const valid = computed(() => {
  186. return (
  187. validateName(name.value) === true &&
  188. validateSurname(surname.value) === true &&
  189. validateEmail(email.value) === true &&
  190. validateStructureName(structureName.value) === true &&
  191. validateMessage(message.value) === true &&
  192. privacyPolicy.value === true
  193. );
  194. });
  195. const requestTypes = [
  196. "Demande d'information",
  197. "Demande de devis",
  198. "Demande de démonstration",
  199. "Demande d'option supplémentaire",
  200. "Autre",
  201. ];
  202. const requestType = ref(defaultRequestType === 'demo' ? "Demande de démonstration" : null );
  203. const formData = reactive({
  204. gender: null,
  205. postalCode: null,
  206. city: "",
  207. phone: null,
  208. requestType: null,
  209. concernedProduct: "",
  210. newsletterSubscription,
  211. });
  212. // Methods
  213. const submitForm = () => {
  214. if (valid.value) {
  215. console.log("Form submission goes here.");
  216. } else {
  217. console.log("Validation failed!");
  218. }
  219. };
  220. const formDataRefs = toRefs(formData);
  221. const formRefs = {
  222. ...formDataRefs,
  223. name,
  224. surname,
  225. email,
  226. structureName,
  227. message,
  228. privacyPolicy,
  229. valid,
  230. };
  231. </script>
  232. <style scoped>
  233. .infos {
  234. font-size: 20px;
  235. color: #000000;
  236. margin-bottom: 1rem;
  237. }
  238. .container-contact {
  239. max-width: 1400px;
  240. margin: 0 auto;
  241. }
  242. .title-h4 {
  243. font-size: 40px;
  244. line-height: 95px;
  245. color: #000000;
  246. margin-bottom: 1rem;
  247. /** gris moins opaque */
  248. color: rgba(0, 0, 0, 0.3);
  249. }
  250. .image-text {
  251. position: absolute;
  252. top: 40px;
  253. left: 20px;
  254. font-family: "Barlow";
  255. color: white;
  256. font-size: 3rem;
  257. width: 30rem;
  258. font-style: italic;
  259. font-weight: 300;
  260. line-height: 40px;
  261. }
  262. :deep().subtitle {
  263. font-size: 1.5rem;
  264. line-height: 2rem;
  265. letter-spacing: 0.1rem;
  266. margin-bottom: 1rem;
  267. text-transform: uppercase;
  268. }
  269. .formation {
  270. font-family: "Barlow";
  271. font-style: normal;
  272. font-weight: 600;
  273. font-size: 90px;
  274. line-height: 85px;
  275. text-align: center;
  276. color: #000000;
  277. margin-bottom: 1rem;
  278. }
  279. .menu-container {
  280. display: flex;
  281. justify-content: space-around;
  282. padding: 1rem 10rem;
  283. background: white;
  284. color: #bbb8b8;
  285. font-family: "Barlow";
  286. font-size: 12px;
  287. line-height: 16px;
  288. display: flex;
  289. align-items: center;
  290. text-align: center;
  291. letter-spacing: 0.18em;
  292. text-transform: uppercase;
  293. }
  294. .v-chip.active-menu {
  295. background: black;
  296. color: white;
  297. }
  298. .cover-image {
  299. width: 100%;
  300. height: 15rem;
  301. object-fit: cover;
  302. object-position: center 30%;
  303. margin: 0 auto;
  304. transform: scaleX(-1);
  305. }
  306. </style>