@@ -467,8 +467,8 @@ class DatasetCreationHandler {
467467 if ( direction < 0 || this . validateCurrentStep ( ) ) {
468468 const nextStep = this . currentStep + direction ;
469469
470- // Update review step if moving to it
471- if ( nextStep === 3 ) {
470+ // Update review step if moving to it (step 5 = index 4)
471+ if ( nextStep === 4 ) {
472472 this . updateReviewStep ( ) ;
473473 }
474474
@@ -487,7 +487,7 @@ class DatasetCreationHandler {
487487 */
488488 updateReviewStep ( ) {
489489 // Update dataset name
490- const nameDisplay = document . querySelector ( "#step4 .dataset-name" ) ;
490+ const nameDisplay = document . querySelector ( "#step5 .dataset-name" ) ;
491491 if ( nameDisplay ) {
492492 nameDisplay . textContent = this . nameField ? this . nameField . value : "" ;
493493 }
@@ -499,37 +499,11 @@ class DatasetCreationHandler {
499499 this . updateAuthorsDisplayFallback ( ) ;
500500 }
501501
502- // Update status display
503- const statusDisplay = document . querySelector ( "#step4 .dataset-status" ) ;
504- if ( statusDisplay ) {
505- if ( this . statusField ?. options && this . statusField . selectedIndex >= 0 ) {
506- statusDisplay . textContent =
507- this . statusField . options [ this . statusField . selectedIndex ] . text ;
508- } else {
509- statusDisplay . textContent = "" ;
510- }
511- }
512-
513- // Update visibility display
514- const visibilityDisplay = document . querySelector (
515- "#step4 .dataset-visibility" ,
516- ) ;
517- if ( visibilityDisplay ) {
518- const isPublic =
519- document . querySelector ( 'input[name="is_public"]:checked' ) ?. value ===
520- "true" ;
521- if ( isPublic ) {
522- visibilityDisplay . innerHTML =
523- '<span class="badge bg-primary"><i class="bi bi-globe me-1"></i>Public</span>' ;
524- } else {
525- visibilityDisplay . innerHTML =
526- '<span class="badge bg-danger"><i class="bi bi-lock-fill me-1"></i>Private</span>' ;
527- }
528- }
502+ // Status and visibility are now handled in publishing info panel by DatasetModeManager
529503
530504 // Update description display
531505 const descriptionDisplay = document . querySelector (
532- "#step4 .dataset-description" ,
506+ "#step5 .dataset-description" ,
533507 ) ;
534508 if ( descriptionDisplay ) {
535509 descriptionDisplay . textContent = this . descriptionField
@@ -546,7 +520,7 @@ class DatasetCreationHandler {
546520 */
547521 updateAuthorsDisplayFallback ( ) {
548522 const authorsField = document . getElementById ( "id_authors" ) ;
549- const authorsDisplay = document . querySelector ( "#step4 .dataset-authors" ) ;
523+ const authorsDisplay = document . querySelector ( "#step5 .dataset-authors" ) ;
550524
551525 if ( authorsField ?. value && authorsDisplay ) {
552526 try {
@@ -637,12 +611,12 @@ class DatasetCreationHandler {
637611 }
638612
639613 if ( this . submitBtn ) {
640- const isLastStep = this . currentStep === this . steps . length - 1 ;
641- if ( isLastStep ) {
642- window . DOMUtils . show ( this . submitBtn ) ;
614+ // Only show submit button on final step (step 5, index 4)
615+ if ( this . currentStep === 4 ) {
616+ window . DOMUtils . show ( this . submitBtn , "display-inline-block" ) ;
643617 this . submitBtn . disabled = ! isValid ;
644618 } else {
645- window . DOMUtils . hide ( this . submitBtn ) ;
619+ window . DOMUtils . hide ( this . submitBtn , "display-inline-block" ) ;
646620 }
647621 }
648622 }
@@ -672,7 +646,7 @@ class DatasetCreationHandler {
672646 if ( this . nextBtn ) {
673647 this . nextBtn . disabled = ! isValid ;
674648 }
675- if ( this . submitBtn && this . currentStep === this . steps . length - 1 ) {
649+ if ( this . submitBtn && this . currentStep === 4 ) {
676650 this . submitBtn . disabled = ! isValid ;
677651 }
678652
0 commit comments