Browse Source

Remove TasklistController as no longer required

pull/404/head
Paul Robert Lloyd 3 years ago
parent
commit
591d67605d
  1. 3
      app/frontend/controllers/index.js
  2. 8
      app/frontend/controllers/tasklist_controller.js
  3. 5
      app/views/case_logs/edit.html.erb

3
app/frontend/controllers/index.js

@ -14,6 +14,3 @@ application.register("govukfrontend", GovukfrontendController)
import NumericQuestionController from "./numeric_question_controller.js"
application.register("numeric-question", NumericQuestionController)
import TasklistController from "./tasklist_controller.js"
application.register("tasklist", TasklistController)

8
app/frontend/controllers/tasklist_controller.js

@ -1,8 +0,0 @@
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
addHighlight() {
let section_to_highlight = this.element.dataset.info;
document.getElementById(section_to_highlight).classList.add('tasklist_item_highlight');
}
}

5
app/views/case_logs/edit.html.erb

@ -18,10 +18,7 @@
</p>
<p>
<% if next_incomplete_section.present? %>
<a class="app-section-skip-link" href="#<%= next_incomplete_section.id.dasherize %>"
data-controller="tasklist"
data-action="tasklist#addHighlight"
data-info=<%= next_incomplete_section.id %>>
<a class="app-section-skip-link" href="#<%= next_incomplete_section.id.dasherize %>">
Skip to next incomplete section: <%= next_incomplete_section.label %>
</a>
<% end %>

Loading…
Cancel
Save