nerala commited on
Commit
8b663db
·
verified ·
1 Parent(s): 9d3ccce

Can't click continue button on the first page anymore. Contact Person field has a different color - Follow Up Deployment

Browse files
Files changed (1) hide show
  1. index.html +55 -11
index.html CHANGED
@@ -338,19 +338,63 @@
338
  // Initialize form
339
  showStep(currentStep);
340
 
341
- // File upload handler
 
 
 
342
  pitchDeckInput.addEventListener('change', function(e) {
343
- if (e.target.files.length > 0) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
344
  fileNameDisplay.classList.remove('hidden');
345
- uploadedFileName.textContent = e.target.files[0].name;
346
  } else {
347
  fileNameDisplay.classList.add('hidden');
348
  }
349
- });
350
 
351
  // Next button click
352
  nextBtn.addEventListener('click', function() {
353
  if (validateStep(currentStep)) {
 
 
 
 
354
  currentStep++;
355
  showStep(currentStep);
356
  }
@@ -440,16 +484,16 @@
440
  if (!input.value.trim()) {
441
  input.classList.add('border-red-500');
442
  isValid = false;
443
-
444
- // Remove error class when user starts typing
445
- input.addEventListener('input', function() {
446
- if (this.value.trim()) {
447
- this.classList.remove('border-red-500');
448
- }
449
- });
450
  } else {
451
  input.classList.remove('border-red-500');
452
  }
 
 
 
 
 
 
 
453
  });
454
 
455
  // Special validation for file upload
 
338
  // Initialize form
339
  showStep(currentStep);
340
 
341
+ // File upload handlers
342
+ const dropZone = document.getElementById('dropZone');
343
+
344
+ // Handle file selection
345
  pitchDeckInput.addEventListener('change', function(e) {
346
+ handleFiles(e.target.files);
347
+ });
348
+
349
+ // Handle drag and drop
350
+ ['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
351
+ dropZone.addEventListener(eventName, preventDefaults, false);
352
+ });
353
+
354
+ function preventDefaults(e) {
355
+ e.preventDefault();
356
+ e.stopPropagation();
357
+ }
358
+
359
+ ['dragenter', 'dragover'].forEach(eventName => {
360
+ dropZone.addEventListener(eventName, highlight, false);
361
+ });
362
+
363
+ ['dragleave', 'drop'].forEach(eventName => {
364
+ dropZone.addEventListener(eventName, unhighlight, false);
365
+ });
366
+
367
+ function highlight() {
368
+ dropZone.classList.add('bg-blue-900/50');
369
+ }
370
+
371
+ function unhighlight() {
372
+ dropZone.classList.remove('bg-blue-900/50');
373
+ }
374
+
375
+ dropZone.addEventListener('drop', function(e) {
376
+ const dt = e.dataTransfer;
377
+ const files = dt.files;
378
+ pitchDeckInput.files = files;
379
+ handleFiles(files);
380
+ });
381
+
382
+ function handleFiles(files) {
383
+ if (files.length > 0) {
384
  fileNameDisplay.classList.remove('hidden');
385
+ uploadedFileName.textContent = files[0].name;
386
  } else {
387
  fileNameDisplay.classList.add('hidden');
388
  }
389
+ }
390
 
391
  // Next button click
392
  nextBtn.addEventListener('click', function() {
393
  if (validateStep(currentStep)) {
394
+ // Update review fields before showing review step
395
+ if (currentStep === formSteps.length - 2) {
396
+ updateReviewFields();
397
+ }
398
  currentStep++;
399
  showStep(currentStep);
400
  }
 
484
  if (!input.value.trim()) {
485
  input.classList.add('border-red-500');
486
  isValid = false;
 
 
 
 
 
 
 
487
  } else {
488
  input.classList.remove('border-red-500');
489
  }
490
+
491
+ // Remove error class when user starts typing
492
+ input.addEventListener('input', function() {
493
+ if (this.value.trim()) {
494
+ this.classList.remove('border-red-500');
495
+ }
496
+ });
497
  });
498
 
499
  // Special validation for file upload