Skip to content

Commit e13758d

Browse files
evdngslseboo
authored andcommitted
Revert "LUT-28957 Checking answer completeness before submission"
This reverts commit 3bed4be.
1 parent 8b34229 commit e13758d

File tree

3 files changed

+0
-29
lines changed

3 files changed

+0
-29
lines changed

src/java/fr/paris/lutece/plugins/forms/resources/forms_messages.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,6 @@ xpage.form.view.loadBackUp=Resuming backup of {0}
947947
response.xpage.form.view.pageTitle=My response to the form
948948
response.xpage.form.view.pagePathLabel=My response to the form
949949

950-
xpage.form.error.steps.validation=You have a validation error in the steps : {0}
951950
xpage.form.error.control={0}
952951
xpage.form.error.limitNumberResponse=You have already responded to this form, so you can no longer access it
953952
xpage.listForms.pagetitle=List of forms

src/java/fr/paris/lutece/plugins/forms/resources/forms_messages_fr.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,6 @@ xpage.form.view.loadBackUp=Reprise de la sauvegarde du {0}
951951
response.xpage.form.view.pageTitle=Ma r\u00e9ponse au formulaire
952952
response.xpage.form.view.pagePathLabel=Ma r\u00e9ponse au formulaire
953953

954-
xpage.form.error.steps.validation=Vous avez une erreur de validation des \u00e9tapes : {0}
955954
xpage.form.error.control={0}
956955
xpage.form.error.limitNumberResponse=Vous avez d\u00e9j\u00e0 r\u00e9pondu \u00e0 ce formulaire, vous ne pouvez donc plus y acc\u00e9der
957956
xpage.listForms.pagetitle=Liste des formulaires

src/java/fr/paris/lutece/plugins/forms/web/FormXPage.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ public class FormXPage extends MVCApplication
105105
protected static final String MESSAGE_PATH = "forms.xpage.form.view.pagePathLabel";
106106
protected static final String MESSAGE_ERROR_NOT_RESPONSE_AGAIN_FORM = "forms.xpage.form.error.limitNumberResponse";
107107
protected static final String MESSAGE_ERROR_CONTROL = "forms.xpage.form.error.control";
108-
protected static final String MESSAGE_ERROR_STEPS_VALIDATION = "forms.xpage.form.error.steps.validation";
109108
protected static final String MESSAGE_LIST_FORMS_PAGETITLE = "forms.xpage.listForms.pagetitle";
110109
protected static final String MESSAGE_LIST_FORMS_PATHLABEL = "forms.xpage.listForms.pathlabel";
111110
private static final String MESSAGE_WARNING_LOST_SESSION = "forms.warning.lost.session";
@@ -609,18 +608,6 @@ public synchronized XPage doFormResponseSummary( HttpServletRequest request ) th
609608
return getStepView( request );
610609
}
611610
FormsResponseUtils.fillResponseManagerWithResponses( request, true, _formResponseManager, _stepDisplayTree.getQuestions( ), false );
612-
List<Step> stepList = StepHome.getStepsListByForm( form.getId( ) );
613-
Set<Integer> validatedStepIds = _formResponseManager.getValidatedSteps( ).stream( ).map( Step::getId ).collect( Collectors.toSet( ) );
614-
615-
List<Step> invalidSteps = stepList.stream( ).filter( step -> !validatedStepIds.contains( step.getId( ) ) ).collect( Collectors.toList( ) );
616-
617-
if ( !invalidSteps.isEmpty( ) )
618-
{
619-
SiteMessageService.setMessage( request, MESSAGE_ERROR_STEPS_VALIDATION, new Object [ ] {
620-
invalidSteps.stream( ).map(Step::getTitle).collect( Collectors.joining(", ") )
621-
}, null, null, null, SiteMessage.TYPE_ERROR, null, getViewFullUrl( VIEW_STEP ) );
622-
return getStepView( request );
623-
}
624611
boolean needValidation = form.isCaptchaStepFinal( );
625612
if ( isCaptchaKO( request, needValidation ) )
626613
{
@@ -726,20 +713,6 @@ public synchronized XPage doSaveFormResponse( HttpServletRequest request ) throw
726713
return getStepView( request );
727714
}
728715
FormsResponseUtils.fillResponseManagerWithResponses( request, true, _formResponseManager, _stepDisplayTree.getQuestions( ), false );
729-
730-
List<Step> stepList = StepHome.getStepsListByForm( form.getId( ) );
731-
Set<Integer> validatedStepIds = _formResponseManager.getValidatedSteps( ).stream( ).map( Step::getId ).collect( Collectors.toSet( ) );
732-
733-
List<Step> invalidSteps = stepList.stream( ).filter( step -> !validatedStepIds.contains( step.getId( ) ) ).collect( Collectors.toList( ) );
734-
735-
if ( !invalidSteps.isEmpty( ) )
736-
{
737-
SiteMessageService.setMessage( request, MESSAGE_ERROR_STEPS_VALIDATION, new Object [ ] {
738-
invalidSteps.stream( ).map(Step::getTitle).collect( Collectors.joining(", ") )
739-
}, null, null, null, SiteMessage.TYPE_ERROR, null, getViewFullUrl( VIEW_STEP ) );
740-
return getStepView( request );
741-
}
742-
743716
boolean needValidation = form.isCaptchaStepFinal( );
744717
if ( isCaptchaKO( request, needValidation ) )
745718
{

0 commit comments

Comments
 (0)