Skip to content

Commit

Permalink
Améliore le message de création de demande
Browse files Browse the repository at this point in the history
  • Loading branch information
niladic committed Aug 21, 2024
1 parent 4055bab commit 5f3c652
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/controllers/ApplicationController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ import services.{
}
import views.applications.myApplications.MyApplicationInfos
import views.dashboard.DashboardInfos
import views.helpers.forms.flashSuccessRawHtmlKey

/** This controller creates an `Action` to handle HTTP requests to the application's home page.
*/
Expand Down Expand Up @@ -415,7 +416,11 @@ case class ApplicationController @Inject() (
removeSharedAccountUserSignature(request.session)
)(signature => saveSharedAccountUserSignature(request.session, signature))
)
.flashing(success -> "Votre demande a bien été envoyée")
.flashing(
flashSuccessRawHtmlKey -> views.application
.applicationSentSuccessMessage(applicationId)
.toString
)
} else {
eventService.log(
EventType.ApplicationCreationError,
Expand Down
10 changes: 10 additions & 0 deletions app/views/application.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ import views.helpers.forms.CSRFInput

object application {

def applicationSentSuccessMessage(applicationId: UUID): Tag =
span(
"Votre demande a bien été envoyée. Vous pouvez la consulter ",
a(href := ApplicationController.show(applicationId).url, "en cliquant ici"),
". Celle-ci n’est plus modifiable, cependant il vous est toujours possible d’envoyer un message pour apporter une précision ou corriger une erreur. ",
"Pour créer une nouvelle demande, vous pouvez ",
a(href := ApplicationController.create.url, "cliquer sur ce lien"),
" ou cliquer sur le bouton « Créer une demande »."
)

def applicationFilesLinks(
files: List[FileMetadata],
application: Application,
Expand Down

0 comments on commit 5f3c652

Please sign in to comment.