diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 4f45087b59..749a5e83eb 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -32,6 +32,7 @@ @use "pages/casa_cases"; @use "pages/casa_org"; @use "pages/case_contacts"; +@use "pages/case_contacts_form"; @use "pages/court_dates"; @use "pages/emancipation"; @use "pages/feature_flags"; diff --git a/app/assets/stylesheets/pages/case_contacts_form.scss b/app/assets/stylesheets/pages/case_contacts_form.scss new file mode 100644 index 0000000000..6007418ba6 --- /dev/null +++ b/app/assets/stylesheets/pages/case_contacts_form.scss @@ -0,0 +1,31 @@ +@use "../base/breakpoints.scss" as screen-sizes; + +.case-contacts-form { + &-buttons { + display: flex; + justify-content: flex-end; + gap: 10px; + + @media only screen and (max-width: screen-sizes.$mobile) { + & > a, & > button { + flex-grow: 1; + } + } + } + + &-checkbox { + border-color: #757575; + } + + &-title { + @media only screen and (max-width: screen-sizes.$mobile) { + font-size: 28px; + } + } + + &-subtitle { + @media only screen and (max-width: screen-sizes.$mobile) { + font-size: 24px; + } + } +} \ No newline at end of file diff --git a/app/components/form/title_component.html.erb b/app/components/form/title_component.html.erb index 8ce253565d..4935a40d4a 100644 --- a/app/components/form/title_component.html.erb +++ b/app/components/form/title_component.html.erb @@ -1,14 +1,14 @@
-

<%= @title %>

+

<%= @title %>

<% if @autosave %> <% end %>
-

<%= @subtitle %>

+

<%= @subtitle %>

<% if @progress %>

diff --git a/app/views/case_contacts/form/details.html.erb b/app/views/case_contacts/form/details.html.erb index 26d5acb0b1..f5e9308627 100644 --- a/app/views/case_contacts/form/details.html.erb +++ b/app/views/case_contacts/form/details.html.erb @@ -14,7 +14,7 @@ casa_case.id, @case_contact.draft_case_ids.include?(casa_case.id), id: "case_contact_draft_case_id_#{casa_case.id}", - class: ["form-check-input", "casa-case-id"] %> + class: ["form-check-input", "casa-case-id", "case-contacts-form-checkbox"] %> @@ -37,7 +37,7 @@ <%= form.radio_button :contact_made, true, checked: @case_contact.contact_made, required: true, - class: 'form-check-input' %> + class: ["form-check-input", "case-contacts-form-checkbox"] %> <%= form.label "Yes", class: "form-check-label", for: "case_contact_contact_made_true" %>

@@ -45,7 +45,7 @@ <%= form.radio_button :contact_made, false, checked: set_contact_made_false(@case_contact), required: true, - class: 'form-check-input' %> + class: ["form-check-input", "case-contacts-form-checkbox"] %> <%= form.label "No", class: "form-check-label", for: "case_contact_contact_made_false" %>
@@ -55,7 +55,7 @@
<%= form.collection_radio_buttons(:medium_type, contact_mediums, 'value', 'label') do |b| %>
- <%= b.radio_button(class: "form-check-input") %> + <%= b.radio_button(class: ["form-check-input", "case-contacts-form-checkbox"]) %> <%= b.label(class: "form-check-label") %>
<% end %> @@ -90,13 +90,13 @@
<% end %> -
+
<%= link_to leave_case_contacts_form_path, class: "btn-sm main-btn #{@case_contact.draft_case_ids.empty? ? 'danger' : 'primary'}-btn-outline btn-hover", data: { controller: "alert", "action": "alert#confirm", "alert-ignore-value": !@case_contact.draft_case_ids.empty?, "alert-title-value": "Discard draft?", "alert-message-value": "Are you sure? If you don't save and continue to the next step, this draft will not be recoverable." } do %> Back <% end %> <%= button_tag( type: "submit" , class: "btn-sm main-btn primary-btn btn-hover" ) do %> - Save and continue + Save and Continue <% end %>
<% end %> diff --git a/app/views/case_contacts/form/expenses.html.erb b/app/views/case_contacts/form/expenses.html.erb index 0b780d973c..2d981abeae 100644 --- a/app/views/case_contacts/form/expenses.html.erb +++ b/app/views/case_contacts/form/expenses.html.erb @@ -16,14 +16,14 @@
<%= form.radio_button :want_driving_reimbursement, true, required: false, - class: 'form-check-input' %> + class: ["form-check-input", "case-contacts-form-checkbox"] %> <%= form.label "Yes", class: "form-check-label", for: "case_contact_want_driving_reimbursement_true" %>
<%= form.radio_button :want_driving_reimbursement, false, required: false, - class: 'form-check-input' %> + class: ["form-check-input", "case-contacts-form-checkbox"] %> <%= form.label "No", class: "form-check-label", for: "case_contact_want_driving_reimbursement_false" %>
@@ -144,7 +144,7 @@
<% end %> -
+
<%= link_to previous_wizard_path(case_contact_id: @case_contact.id), class: "btn-sm main-btn primary-btn-outline btn-hover" do %> Back <% end %> diff --git a/app/views/case_contacts/form/notes.html.erb b/app/views/case_contacts/form/notes.html.erb index a524a872de..d648a7b189 100644 --- a/app/views/case_contacts/form/notes.html.erb +++ b/app/views/case_contacts/form/notes.html.erb @@ -30,13 +30,13 @@
-
+
<%= link_to previous_wizard_path(case_contact_id: @case_contact.id), class: "btn-sm main-btn primary-btn-outline btn-hover" do %> Back <% end %> <%= button_tag( type: "submit" , class: "btn-sm main-btn primary-btn btn-hover" ) do %> - Save and continue + Save and Continue <% end %>
<% end %> diff --git a/spec/support/fill_in_case_contact_fields.rb b/spec/support/fill_in_case_contact_fields.rb index 25ed699130..35a266621f 100644 --- a/spec/support/fill_in_case_contact_fields.rb +++ b/spec/support/fill_in_case_contact_fields.rb @@ -29,14 +29,14 @@ def complete_details_page(contact_made:, medium: nil, occurred_on: nil, hours: n check contact_topic end - click_on "Save and continue" + click_on "Save and Continue" end # @param notes [String] def complete_notes_page(notes: "", click_continue: true) fill_in "Additional notes", with: notes - click_on "Save and continue" if click_continue + click_on "Save and Continue" if click_continue end # This intentionally does not submit the form