|
|
|
@ -7,14 +7,14 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function showTab(n) {
|
|
|
|
|
var x = document.getElementsByClassName("tab");
|
|
|
|
|
const x = document.getElementsByClassName("tab");
|
|
|
|
|
x[n].style.display = "block";
|
|
|
|
|
if (n == 0) {
|
|
|
|
|
if (n === 0) {
|
|
|
|
|
document.getElementById("prevBtn").style.display = "none";
|
|
|
|
|
} else {
|
|
|
|
|
document.getElementById("prevBtn").style.display = "inline";
|
|
|
|
|
}
|
|
|
|
|
if (n == (x.length - 1)) {
|
|
|
|
|
if (n === (x.length - 1)) {
|
|
|
|
|
document.getElementById("nextBtn").innerHTML = '<i class="fa fa-angle-double-right"></i>';
|
|
|
|
|
} else {
|
|
|
|
|
document.getElementById("nextBtn").innerHTML = '<i class="fa fa-angle-double-right"></i>';
|
|
|
|
@ -23,8 +23,8 @@ function showTab(n) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function nextPrev(n) {
|
|
|
|
|
var x = document.getElementsByClassName("tab");
|
|
|
|
|
if (n == 1 && !validateForm()) return false;
|
|
|
|
|
const x = document.getElementsByClassName("tab");
|
|
|
|
|
if (n === 1 && !validateForm()) return false;
|
|
|
|
|
x[currentTab].style.display = "none";
|
|
|
|
|
currentTab = currentTab + n;
|
|
|
|
|
if (currentTab >= x.length) {
|
|
|
|
@ -42,11 +42,11 @@ function nextPrev(n) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function validateForm() {
|
|
|
|
|
var x, y, i, valid = true;
|
|
|
|
|
let 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 == "") {
|
|
|
|
|
if (y[i].value === "") {
|
|
|
|
|
y[i].className += " invalid";
|
|
|
|
|
valid = false;
|
|
|
|
|
}
|
|
|
|
@ -60,7 +60,7 @@ function validateForm() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fixStepIndicator(n) {
|
|
|
|
|
var i, x = document.getElementsByClassName("step");
|
|
|
|
|
let i, x = document.getElementsByClassName("step");
|
|
|
|
|
for (i = 0; i < x.length; i++) {
|
|
|
|
|
x[i].className = x[i].className.replace(" active", "");
|
|
|
|
|
}
|
|
|
|
|