diff --git a/Gemfile b/Gemfile index 65fc882d1..702084009 100644 --- a/Gemfile +++ b/Gemfile @@ -25,8 +25,8 @@ gem "govuk_design_system_formbuilder" gem "govuk_markdown" # GOV UK Notify gem "notifications-ruby-client" -# Turbo and Stimulus -gem "hotwire-rails" +# A modest javascript framework for the html you already have +gem "stimulus-rails" # Administration framework gem "activeadmin" # Admin charts diff --git a/Gemfile.lock b/Gemfile.lock index e67720b85..a0a4e09a9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -188,10 +188,6 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) hashdiff (1.0.1) - hotwire-rails (0.1.3) - rails (>= 6.0.0) - stimulus-rails - turbo-rails i18n (1.10.0) concurrent-ruby (~> 1.0) inherited_resources (1.13.1) @@ -430,9 +426,6 @@ GEM thor (1.2.1) timecop (0.9.5) timeout (0.2.0) - turbo-rails (1.0.1) - actionpack (>= 6.0.0) - railties (>= 6.0.0) tzinfo (2.0.4) concurrent-ruby (~> 1.0) uk_postcode (2.1.7) @@ -480,7 +473,6 @@ DEPENDENCIES govuk-components govuk_design_system_formbuilder govuk_markdown - hotwire-rails jsbundling-rails json-schema listen (~> 3.3) @@ -507,6 +499,7 @@ DEPENDENCIES sentry-rails sentry-ruby simplecov + stimulus-rails timecop (~> 0.9.4) two_factor_authentication! tzinfo-data diff --git a/app/frontend/application.js b/app/frontend/application.js index d3a684d94..98742bb09 100644 --- a/app/frontend/application.js +++ b/app/frontend/application.js @@ -16,6 +16,5 @@ require.context("govuk-frontend/govuk/assets") import { initAll } from "govuk-frontend" import "./styles/application.scss" import "./controllers" -import "@hotwired/turbo-rails" initAll() diff --git a/app/views/case_logs/edit.html.erb b/app/views/case_logs/edit.html.erb index fe7e2d661..015db4454 100644 --- a/app/views/case_logs/edit.html.erb +++ b/app/views/case_logs/edit.html.erb @@ -4,30 +4,27 @@ content_for(:title) => "" }) %> -<%= turbo_frame_tag "case_log_form", target: "_top" do %> -
<%= get_subsections_count(@case_log, :completed) %> of <%= get_subsections_count(@case_log, :all) %> sections completed.
-- <% next_incomplete_section = get_next_incomplete_section(@case_log) %> -
-- <% if next_incomplete_section.present? %> - - Skip to next incomplete section: <%= next_incomplete_section.label %> - - <% end %> -
- <% elsif @case_log.status == "not_started" %> -This log has not been started.
- <% end %> - - <%= render "tasklist" %> -<%= get_subsections_count(@case_log, :completed) %> of <%= get_subsections_count(@case_log, :all) %> sections completed.
++ <% next_incomplete_section = get_next_incomplete_section(@case_log) %> +
++ <% if next_incomplete_section.present? %> + + Skip to next incomplete section: <%= next_incomplete_section.label %> + + <% end %> +
+ <% elsif @case_log.status == "not_started" %> +This log has not been started.
+ <% end %> + <%= render "tasklist" %><%= @page.description.html_safe %>
- <% end %> +<%= form_with model: @case_log, url: form_case_log_path(@case_log), method: "post" do |f| %> +<%= @page.description.html_safe %>
+ <% end %> + + <% @page.non_conditional_questions.map do |question| %> +