Skip to content

Commit 27ff1d8

Browse files
committed
Add path for new button to application_forms/index view
1 parent afb47cd commit 27ff1d8

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

template/{{app_name}}/engines/flex/app/views/flex/application_forms/index.html.erb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- title: String - Page title
44
- intro: String - Introduction text
55
- new_button_text: String - Text for the "New" button
6+
- new_path: String - Path for the "New" button
67
- in_progress_applications_heading: String - Heading for the in-progress section
78
- application_forms: Array<Hash> - List of application form data with keys:
89
- created_at: String
@@ -33,7 +34,7 @@
3334
<%= intro %>
3435
</p>
3536

36-
<%= link_to new_button_text, "new", class: class_names("usa-button") %>
37+
<%= link_to new_button_text, new_path, class: class_names("usa-button") %>
3738

3839
<% if not application_forms.empty? %>
3940
<h2 class="margin-top-6"><%= in_progress_applications_heading %></h2>

template/{{app_name}}/engines/flex/spec/dummy/app/views/passport_application_forms/index.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: t(".title"),
33
intro: t(".intro"),
44
new_button_text: t(".new_button"),
5+
new_path: new_passport_application_form_path,
56
in_progress_applications_heading: t(".in_progress_applications.heading"),
67
application_forms: @passport_application_forms.map { |form| {
78
created_at: form.created_at.strftime("%B %d, %Y at %I:%M %p"),

template/{{app_name}}/engines/flex/spec/dummy/config/routes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
end
88
end
99

10-
resources :passport_application_forms, only: [ :index, :show ]
10+
resources :passport_application_forms, only: [ :index, :new, :show ]
1111
end

0 commit comments

Comments
 (0)