Skip to content

Commit

Permalink
update the custom form flow (#1285)
Browse files Browse the repository at this point in the history
  • Loading branch information
kasugaijin authored Dec 20, 2024
1 parent 7819e18 commit 9ac8c4e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<div class="d-flex flex-column align-items-center mb-4">
<div class="my-4 mx-8">
<% if params[:dashboard] %>

<% if current_user.person.latest_form_submission.present? %>
<p class="fw-bold mb-0"><%= t('organizations.adopter_fosterer.form_instructions.previous_answers') %> <%= link_to t('general.here'), adopter_fosterer_form_answers_path %>.</p>
<p><%= t('organizations.adopter_fosterer.form_instructions.update_form_answers') %></p>
<section class="container d-flex flex-column py-6">
<div class="row justify-content-center gap-6">
<div class="col-8">
<% if params[:dashboard] %>
<% if current_user.person.latest_form_submission.present? %>
<p class="fw-bold mb-0"><%= t('organizations.adopter_fosterer.form_instructions.previous_answers') %> <%= link_to t('general.here'), adopter_fosterer_form_answers_path %>.</p>
<p><%= t('organizations.adopter_fosterer.form_instructions.update_form_answers') %></p>
<% else %>
<p><%= t("organizations.adopter_fosterer.form_instructions.dashboard", user_email: current_user.email) %></p>
<% end %>
<% else %>
<p><%= t("organizations.adopter_fosterer.form_instructions.dashboard", user_email: current_user.email) %></p>
<% end %>

<% else %>
<p><%= t(
"organizations.adopter_fosterer.form_instructions.index",
organization_name: Current.tenant.name,
) %></p>
<div>
<p class="fw-bold"><%= t(
"organizations.adopter_fosterer.form_instructions.index",
organization_name: Current.tenant.name,
email: current_user.email
) %></p>
<%= link_to "Go to my dashboard", adopter_fosterer_dashboard_index_path, class: "btn btn-primary" %>
</div>
<% end %>
<div class="d-flex justify-content-end gap-2 pb-2">
<%= link_to " #{t("general.view")} #{t("general.dogs")}",
adoptable_pets_path(species: "dog"),
class: "btn btn-primary" %>
<%= link_to " #{t("general.view")} #{t("general.cats")}",
adoptable_pets_path(species: "cat"),
class: "btn btn-primary" %>
</div>

<div class="row">
<iframe id="external-form"
src=<%= @form_url%>
width="90%"
height="645"
>Loading…</iframe>
</div>

</div>
<iframe id="external-form"
src=<%= @form_url%>
width="90%"
height="645"
>Loading…</iframe>
</div>
</section>
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ en:
header: "Welcome to %{organization_name}!"
body_text: "At %{organization_name}, we’re dedicated to rescuing, rehabilitating, and rehoming animals in need. Your support helps us provide care, love, and hope to these pets until they find their forever homes."
form_instructions:
index: "Please complete this form using the same email address you signed up with. %{organization_name} needs this information in order to process your application(s)."
index: "Please complete this form using the same email address you signed up with (%{email}). %{organization_name} needs this information in order to process your application(s). If you do not complete this form now, you can do so later via the 'Form' link in your dashboard"
previous_answers: "You have already completed this form. View your responses"
update_form_answers: "Please only submit this form again if your details have changed and need updating."
dashboard: "Please complete this form so we have sufficient information to begin processing your adoption applications. Please ensure to use the same email address in the form as you did to register on this website (%{user_email})."
Expand Down

0 comments on commit 9ac8c4e

Please sign in to comment.