diff --git a/Source/BusinessClass/TextQuestion.php b/Source/BusinessClass/TextQuestion.php
index 78d0f2f..759f43d 100644
--- a/Source/BusinessClass/TextQuestion.php
+++ b/Source/BusinessClass/TextQuestion.php
@@ -17,9 +17,11 @@ class TextQuestion extends Question
$content = $this->getContent();
$id = $this->getId();
- return "\t\t\t
-
-
-
\n";
+ return "\n";
}
}
diff --git a/Source/Model/ModelCandidate.php b/Source/Model/ModelCandidate.php
index 12cace7..98458cf 100644
--- a/Source/Model/ModelCandidate.php
+++ b/Source/Model/ModelCandidate.php
@@ -76,25 +76,38 @@ class ModelCandidate
$nbQuestions = count($questions);
$time = round(($nbQuestions * 20)/60);
- $html = "
- $title
\n
-
- $description
\n
-
- Temps estimé : $time minutes
- ";
} else {
$html.= "\t\t\n
\t\n";
diff --git a/Source/Views/CSS/styles.css b/Source/Views/CSS/styles.css
new file mode 100644
index 0000000..e0061a7
--- /dev/null
+++ b/Source/Views/CSS/styles.css
@@ -0,0 +1,119 @@
+body {
+ background: #eee
+}
+
+#regForm {
+ background-color: #ffffff;
+ margin: 0px auto;
+ font-family: Raleway;
+ padding: 40px;
+ border-radius: 30px;
+ background-color: rgba(23,143,150,0.7);
+}
+
+#register{
+ color: white;
+}
+
+h1 {
+ text-align: center
+}
+
+input {
+ padding: 10px;
+ width: 100%;
+ font-size: 17px;
+ font-family: Raleway;
+ border: 1px solid #aaaaaa;
+ border-radius: 10px;
+ -webkit-appearance: none;
+}
+
+
+
+.tab input:focus{
+
+ border:1px solid #6a1b9a !important;
+ outline: none;
+}
+
+input.invalid {
+
+ border:1px solid #e03a0666;
+}
+
+.tab {
+ display: none
+}
+
+button {
+ background-color: #6A1B9A;
+ color: #ffffff;
+ border: none;
+ border-radius: 50%;
+ padding: 10px 20px;
+ font-size: 17px;
+ font-family: Raleway;
+ cursor: pointer
+}
+
+button:hover {
+ opacity: 0.8
+}
+
+button:focus{
+
+ outline: none !important;
+}
+
+#prevBtn {
+ background-color: #bbbbbb
+}
+
+
+.all-steps{
+ text-align: center;
+ margin-top: 30px;
+ margin-bottom: 30px;
+ width: 100%;
+ display: inline-flex;
+ justify-content: center;
+}
+
+.step {
+ height: 10px;
+ width: 10px;
+ margin: 0 2px;
+ background-color: #bbbbbb;
+ border: none;
+ border-radius: 50%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ font-size: 15px;
+ color: #6a1b9a;
+ opacity: 0.5;
+}
+
+.step.active {
+ opacity: 1
+}
+
+
+.step.finish {
+ color: #fff;
+ background: green;
+ opacity: 1;
+}
+
+
+
+.all-steps {
+ text-align: center;
+ margin-top: 30px;
+ margin-bottom: 30px
+}
+
+.thanks-message {
+ display: none
+}
\ No newline at end of file
diff --git a/Source/Views/HTML/form.php b/Source/Views/HTML/form.php
index 759300a..a9a3ce6 100644
--- a/Source/Views/HTML/form.php
+++ b/Source/Views/HTML/form.php
@@ -2,14 +2,15 @@
-
-
+
+
+
Formulaire de témoignage
@@ -24,5 +25,8 @@
+
+
+
diff --git a/Source/Views/JS/scripts.js b/Source/Views/JS/scripts.js
new file mode 100644
index 0000000..e21d364
--- /dev/null
+++ b/Source/Views/JS/scripts.js
@@ -0,0 +1,68 @@
+var currentTab = 0;
+document.addEventListener("DOMContentLoaded", function(event) {
+
+
+ showTab(currentTab);
+
+});
+
+function showTab(n) {
+ var x = document.getElementsByClassName("tab");
+ x[n].style.display = "block";
+ if (n == 0) {
+ document.getElementById("prevBtn").style.display = "none";
+ } else {
+ document.getElementById("prevBtn").style.display = "inline";
+ }
+ if (n == (x.length - 1)) {
+ document.getElementById("nextBtn").innerHTML = '';
+ } else {
+ document.getElementById("nextBtn").innerHTML = '';
+ }
+ fixStepIndicator(n)
+}
+
+function nextPrev(n) {
+ var x = document.getElementsByClassName("tab");
+ if (n == 1 && !validateForm()) return false;
+ x[currentTab].style.display = "none";
+ currentTab = currentTab + n;
+ if (currentTab >= x.length) {
+
+ document.getElementById("nextprevious").style.display = "none";
+ document.getElementById("all-steps").style.display = "none";
+ document.getElementById("register").style.display = "none";
+ document.getElementById("text-message").style.display = "block";
+
+
+
+
+ }
+ showTab(currentTab);
+}
+
+function validateForm() {
+ var x, y, i, valid = true;
+ x = document.getElementsByClassName("tab");
+ y = x[currentTab].getElementsByTagName("input");
+ for (i = 0; i < y.length; i++) {
+ if (y[i].value == "") {
+ y[i].className += " invalid";
+ valid = false;
+ }
+
+
+ }
+ if (valid) {
+ document.getElementsByClassName("step")[currentTab].className += " finish";
+ }
+ return valid;
+}
+
+function fixStepIndicator(n) {
+ var i, x = document.getElementsByClassName("step");
+ for (i = 0; i < x.length; i++) {
+ x[i].className = x[i].className.replace(" active", "");
+ }
+ x[n].className += " active";
+}
\ No newline at end of file