diff --git a/src/java/fr/paris/lutece/plugins/workflow/modules/archive/resources/archive_messages.properties b/src/java/fr/paris/lutece/plugins/workflow/modules/archive/resources/archive_messages.properties index 86527ff9..54a7e34b 100644 --- a/src/java/fr/paris/lutece/plugins/workflow/modules/archive/resources/archive_messages.properties +++ b/src/java/fr/paris/lutece/plugins/workflow/modules/archive/resources/archive_messages.properties @@ -14,3 +14,5 @@ task.config.message.numeric.field=The field "{0}" must be a number. task.information.notarchived.message=The archival will happen on {0} (type: {1}). task.information.archived.message=The archival happened on {0} (type: {1}). + +task.confirm_action=Please confirm the archiving of the resource. diff --git a/src/java/fr/paris/lutece/plugins/workflow/modules/archive/resources/archive_messages_fr.properties b/src/java/fr/paris/lutece/plugins/workflow/modules/archive/resources/archive_messages_fr.properties index 4790a8cf..f182130b 100644 --- a/src/java/fr/paris/lutece/plugins/workflow/modules/archive/resources/archive_messages_fr.properties +++ b/src/java/fr/paris/lutece/plugins/workflow/modules/archive/resources/archive_messages_fr.properties @@ -14,3 +14,5 @@ task.config.message.numeric.field=Le champ "{0}" doit \u00eatre num\u00e9rique. task.information.notarchived.message=L''archivage aura lieu le {0} (type: {1}). task.information.archived.message=L''archivage a eu lieu le {0} (type: {1}). + +task.confirm_action=Veuillez confirmer l'archivage de la ressource. diff --git a/src/java/fr/paris/lutece/plugins/workflow/modules/archive/web/ArchiveTaskComponent.java b/src/java/fr/paris/lutece/plugins/workflow/modules/archive/web/ArchiveTaskComponent.java index 5e27c5b1..e7829c04 100644 --- a/src/java/fr/paris/lutece/plugins/workflow/modules/archive/web/ArchiveTaskComponent.java +++ b/src/java/fr/paris/lutece/plugins/workflow/modules/archive/web/ArchiveTaskComponent.java @@ -66,7 +66,8 @@ public class ArchiveTaskComponent extends NoFormTaskComponent { // TEMPLATES private static final String TEMPLATE_TASK_ARCHIVE_CONFIG = "admin/plugins/workflow/modules/archive/task_archive_config.html"; - + private static final String TEMPLATE_CONFIRM_TASK_ARCHIVE = "admin/plugins/workflow/modules/archive/confirm_task_archive.html"; + // MARKS private static final String MARK_LIST_TYPE = "type_list"; private static final String MARK_CONFIG = "config"; @@ -232,4 +233,14 @@ public String getDisplayTaskInformation( int nIdHistory, HttpServletRequest requ return I18nService.getLocalizedString( MESSAGE_INFORMATION_NOT_ARCHIVED, params, locale ); } } + + @Override + public String getDisplayTaskForm( int nIdResource, String strResourceType, HttpServletRequest request, Locale locale, ITask task ) + { + Map model = new HashMap< >( ); + + HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_CONFIRM_TASK_ARCHIVE , locale, model ); + + return template.getHtml( ); + } } diff --git a/webapp/WEB-INF/conf/plugins/workflow_context.xml b/webapp/WEB-INF/conf/plugins/workflow_context.xml index 2e2a9142..7b020745 100644 --- a/webapp/WEB-INF/conf/plugins/workflow_context.xml +++ b/webapp/WEB-INF/conf/plugins/workflow_context.xml @@ -151,7 +151,7 @@ p:beanName="workflow.taskArchive" p:configBeanName="workflow.taskArchiveConfig" p:taskForAutomaticAction="true" - p:configRequired="true" p:formTaskRequired="false" /> + p:configRequired="true" p:formTaskRequired="true" /> + <@columns class="col-sm-12 offset-lg-3 col-lg-6"> + <@callOut color='info' titleLevel='h4' > + #i18n{module.workflow.archive.task.confirm_action} + + + +<@input type='hidden' name='workflow_action_redirection' value='list' /> \ No newline at end of file