Skip to content

Commit

Permalink
submit your application to bs4 (#3945)
Browse files Browse the repository at this point in the history
* submit your application to bs4

* add missing translation

---------

Signed-off-by: kristinmerbach <[email protected]>
  • Loading branch information
kristinmerbach authored and bbodine1 committed Aug 28, 2024
1 parent c39c9d3 commit d6ff698
Show file tree
Hide file tree
Showing 6 changed files with 289 additions and 175 deletions.
2 changes: 1 addition & 1 deletion app/javascript/css/forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ select.button-select {
input[type='checkbox'], input[type='radio'] {
vertical-align: middle;
position: relative;
width: 36px;
width: 24px;
margin-right: $spacer*.25;
margin-left: 0;
accent-color: var(--button-primary-color);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,32 +171,27 @@ document.addEventListener("turbolinks:load", function() {

/* Submit Application Form Related */

$('#living_outside_yes').parents(".row").next().addClass('hide');
$('#living_outside_yes').parents(".row").next().next().addClass('hide');
$('#attestation_terms').addClass('hide');

$("body").on("change", "#living_outside_no", function(){
if ($('#living_outside_no').is(':checked')) {
$(this).parents(".row").next().addClass('hide');
$(this).parents(".row").next().next().addClass('hide');
$("#attestation_terms").addClass('hide');
};
});

$("body").on("change", "#living_outside_yes", function(){
if ($('#living_outside_yes').is(':checked')) {
$(this).parents(".row").next().removeClass('hide');
$(this).parents(".row").next().next().removeClass('hide');
$("#attestation_terms").removeClass('hide');
};
});

// On Load, hide by default if checked no
if($('#living_outside_no').is(':checked')) {
$('#living_outside_no').parents(".row").next().addClass('hide');
$('#living_outside_no').parents(".row").next().next().addClass('hide');
$("#attestation_terms").addClass('hide');
}

if($('#living_outside_yes').is(':checked')) {
$('#living_outside_yes').parents(".row").next().removeClass('hide');
$('#living_outside_yes').parents(".row").next().next().removeClass('hide');
$("#attestation_terms").removeClass('hide');
}
/* Submit Application Form Related */

Expand Down Expand Up @@ -406,7 +401,7 @@ $(document).ready(function(){

if($('#is_student_yes').is(':checked')) {
$('#student_kind, #applicant_student_status_end_on, #student_school_kind').parents('.row-form-wrapper').removeClass('hide');
} else {
} else {
$('#student_kind, #applicant_student_status_end_on, #student_school_kind').parents('.row-form-wrapper').addClass('hide');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class ApplicationsController < FinancialAssistance::ApplicationController
before_action :set_current_person
before_action :set_family
before_action :find_application, :except => [:index, :index_with_filter, :new, :review, :raw_application]
before_action :enable_bs4_layout, only: [:edit, :application_year_selection, :application_checklist, :eligibility_results] if EnrollRegistry.feature_enabled?(:bs4_consumer_flow)
before_action :enable_bs4_layout, only: [:application_year_selection, :application_checklist, :eligibility_results, :submit_your_application, :wait_for_eligibility_response] if EnrollRegistry.feature_enabled?(:bs4_consumer_flow)

around_action :cache_current_hbx, :only => [:index_with_filter]

Expand Down Expand Up @@ -384,9 +384,11 @@ def enable_bs4_layout

def resolve_layout
case action_name
when "step", "review_and_submit", "eligibility_response_error", "application_publish_error"
when "edit", "step", "review_and_submit", "eligibility_response_error", "application_publish_error", "preferences"
"financial_assistance_nav"
when "application_year_selection", "application_checklist", "edit"
when "submit_your_application"
EnrollRegistry.feature_enabled?(:bs4_consumer_flow) ? "financial_assistance_progress" : "financial_assistance_nav"
when "application_year_selection", "application_checklist"
EnrollRegistry.feature_enabled?(:bs4_consumer_flow) ? "financial_assistance_progress" : "financial_assistance"
when "eligibility_results"
if EnrollRegistry.feature_enabled?(:bs4_consumer_flow)
Expand Down
Loading

0 comments on commit d6ff698

Please sign in to comment.