Skip to content

Commit 7c3d5cf

Browse files
committed
Disable moving when success
1 parent ba13288 commit 7c3d5cf

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

frontend/public/scripts.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,14 @@ var step = 0;
7676
var backDisabled = false;
7777

7878
function start() {
79+
if (backDisabled) return;
7980
next();
8081
document.getElementById('start').classList.add('hidden');
8182
document.getElementById('next').classList.remove('hidden');
8283
};
8384

8485
function next() {
86+
if (backDisabled) return;
8587
if (step > 0) {
8688
const currentField = document.querySelector(`.inputField[step="${step}"]`);
8789
if (currentField && currentField.classList.contains('required')) {
@@ -135,6 +137,7 @@ function next() {
135137
};
136138

137139
function back() {
140+
if (backDisabled) return;
138141
if (step > 1) {
139142
document.querySelector(`.inputField[step="${step}"]`)?.classList.remove('active');
140143
step--;
@@ -209,6 +212,7 @@ document.addEventListener('keydown', function (event) {
209212
});
210213

211214
async function create() {
215+
if (backDisabled) return;
212216
anim_out();
213217
var data = {};
214218
document.querySelectorAll('.inputField').forEach(field => {

0 commit comments

Comments
 (0)