@@ -82,12 +82,12 @@ private void addFormDataDetailsComponent() {
8282 Label newFormDataHeading = new Label (I18nProperties .getString (Strings .headingCampaignFormDataDuplicateNew ));
8383 CssStyles .style (newFormDataHeading , CssStyles .H3 );
8484 formDataDetailsLayout .addComponent (newFormDataHeading );
85- formDataDetailsLayout .addComponent (buildFormDataDetailsComponent (newData ));
85+ formDataDetailsLayout .addComponent (buildFormDataDetailsComponent (newData , false ));
8686
8787 Label existingFormDataHeading = new Label (I18nProperties .getString (Strings .headingCampaignFormDataDuplicateExisting ));
8888 CssStyles .style (existingFormDataHeading , CssStyles .H3 );
8989 formDataDetailsLayout .addComponent (existingFormDataHeading );
90- formDataDetailsLayout .addComponent (buildFormDataDetailsComponent (existingData ));
90+ formDataDetailsLayout .addComponent (buildFormDataDetailsComponent (existingData , true ));
9191
9292 addComponent (formDataDetailsLayout );
9393 }
@@ -97,7 +97,7 @@ private void addButtons() {
9797 HorizontalLayout buttonLayout = new HorizontalLayout ();
9898 buttonLayout .setWidthUndefined ();
9999
100- Button btnCancel = new Button (I18nProperties .getCaption (Captions .actionCancel ));
100+ Button btnCancel = new Button (I18nProperties .getCaption (Captions .importCancelImport ));
101101 btnCancel .addClickListener (e -> cancelCallback .run ());
102102 buttonLayout .addComponent (btnCancel );
103103
@@ -114,7 +114,7 @@ private void addButtons() {
114114 setComponentAlignment (buttonLayout , Alignment .MIDDLE_RIGHT );
115115 }
116116
117- private HorizontalLayout buildFormDataDetailsComponent (CampaignFormDataDto formData ) {
117+ private HorizontalLayout buildFormDataDetailsComponent (CampaignFormDataDto formData , boolean existingData ) {
118118 HorizontalLayout formDataLayout = new HorizontalLayout ();
119119 formDataLayout .setSpacing (true );
120120 {
@@ -138,15 +138,17 @@ private HorizontalLayout buildFormDataDetailsComponent(CampaignFormDataDto formD
138138 fdFormDate .setWidthUndefined ();
139139 formDataLayout .addComponent (fdFormDate );
140140
141- Label fdCreatingUser = new Label (formData .getCreatingUser () != null ? formData .getCreatingUser ().toString () : "" );
142- fdCreatingUser .setCaption (I18nProperties .getPrefixCaption (CampaignFormDataDto .I18N_PREFIX , CampaignFormDataDto .CREATING_USER ));
143- fdCreatingUser .setWidthUndefined ();
144- formDataLayout .addComponent (fdCreatingUser );
145-
146- Label fdCreationDate = new Label (DateFormatHelper .formatDate (formData .getCreationDate ()));
147- fdCreationDate .setCaption (I18nProperties .getPrefixCaption (CampaignFormDataDto .I18N_PREFIX , CampaignFormDataDto .CREATION_DATE ));
148- fdCreationDate .setWidthUndefined ();
149- formDataLayout .addComponent (fdCreationDate );
141+ if (existingData ) {
142+ Label fdCreatingUser = new Label (formData .getCreatingUser () != null ? formData .getCreatingUser ().toString () : "" );
143+ fdCreatingUser .setCaption (I18nProperties .getPrefixCaption (CampaignFormDataDto .I18N_PREFIX , CampaignFormDataDto .CREATING_USER ));
144+ fdCreatingUser .setWidthUndefined ();
145+ formDataLayout .addComponent (fdCreatingUser );
146+
147+ Label fdCreationDate = new Label (DateFormatHelper .formatDate (formData .getCreationDate ()));
148+ fdCreationDate .setCaption (I18nProperties .getPrefixCaption (CampaignFormDataDto .I18N_PREFIX , CampaignFormDataDto .CREATION_DATE ));
149+ fdCreationDate .setWidthUndefined ();
150+ formDataLayout .addComponent (fdCreationDate );
151+ }
150152 }
151153
152154 return formDataLayout ;
0 commit comments