Skip to content

Commit 52befcb

Browse files
committed
Create form success screen
1 parent d4ca800 commit 52befcb

5 files changed

Lines changed: 41 additions & 8 deletions

File tree

app/assets/stylesheets/marketing_redesign/components/_section.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@
6666
margin: 0;
6767
}
6868

69+
.success-info {
70+
.button {
71+
margin-block: var(--space--medium);
72+
}
73+
}
74+
6975
@media screen and (min-width: 998px) {
7076
.contact-header {
7177
text-align: left;

app/controllers/marketing_redesign/opportunities_controller.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@ def create
1212
conversion_point: HUB_CONVERSION_POINT,
1313
project_type: HUB_PROJECT_TYPE
1414
})
15-
redirect_back(
16-
fallback_location: {action: :new}
15+
redirect_to(
16+
{action: :show}
1717
)
1818
end
1919

20+
def show
21+
end
22+
2023
private
2124

2225
def opportunity_params
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<%= content_for(:page_title, t(".page_title")) %>
2+
<section class="section contact-us">
3+
<div class="contact-header">
4+
<h1><%= t(".section_title") %></h1>
5+
<p class="text-lg"><%= t(".section_subtitle") %></p>
6+
</div>
7+
<div class="success-info">
8+
<h4><%= t(".form_success_title") %></h4>
9+
<p><%= t(".form_success_subtitle") %></p>
10+
<%= link_to(
11+
t(".cta"),
12+
{controller: "/marketing_redesign/home", action: :show},
13+
class: "button button--primary"
14+
) %>
15+
</div>
16+
</section>

config/locales/en.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,15 +254,22 @@ en:
254254
opportunities:
255255
new:
256256
attributes:
257-
contact_first_name: First name
258-
contact_last_name: Last name
257+
contact_first_name: First Name
258+
contact_last_name: Last Name
259259
email: Email
260-
company_name: Company name
261-
contact_job_title: Your role
260+
company_name: Company Name
261+
contact_job_title: Your Role
262262
page_title: Contact Us
263263
section_title: Let’s get to know you and your needs
264264
section_subtitle: Help us tailor your learning experience.
265265
submit: Send
266+
show:
267+
page_title: Contact Us
268+
section_title: Let’s get to know you and your needs
269+
section_subtitle: Help us tailor your learning experience.
270+
form_success_title: Thank you for reaching out!
271+
form_success_subtitle: We’ll be in touch as soon as possible with the email you provided
272+
cta: Return to Home
266273
library:
267274
show:
268275
page_title: Library

config/routes.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
get "about-us", controller: :about, action: :show
1111
resources(
1212
:opportunities,
13-
only: %i[new create],
13+
only: %i[new create show],
1414
path: "contact-us",
1515
path_names: {
16-
new: ""
16+
new: "",
17+
show: "success",
1718
}
1819
)
1920
if Rails.env.development?

0 commit comments

Comments
 (0)