diff --git a/app/services/content/connector.rb b/app/services/content/connector.rb index 03317dad5..e3e5dbd2d 100644 --- a/app/services/content/connector.rb +++ b/app/services/content/connector.rb @@ -37,7 +37,7 @@ def self.reset! def self.create_client(space_id:, access_token:, preview: false) api_url = preview ? "preview.contentful.com" : "cdn.contentful.com" - options = { + ::Contentful::Client.new( api_url:, space: space_id, access_token:, @@ -45,9 +45,7 @@ def self.create_client(space_id:, access_token:, preview: false) raise_errors: true, application_name: "DfE: Buy For Your School", application_version: "1.0.0", - } - - ::Contentful::Client.new(options) + ) end # @param api [Symbol, String] diff --git a/app/views/support/cases/additional_contacts/_form.html.erb b/app/views/support/cases/additional_contacts/_form.html.erb index 323f79d4b..f5a94ad0a 100644 --- a/app/views/support/cases/additional_contacts/_form.html.erb +++ b/app/views/support/cases/additional_contacts/_form.html.erb @@ -11,33 +11,10 @@ <%= form.govuk_text_field :phone_number, width: 'one-quarter', label: { text: I18n.t("support.case_contact_details.label.phone") } %> <%= form.govuk_text_field :extension_number, width: 'one-quarter', label: { text: I18n.t("support.case_contact_details.label.extension_number") } %> - <% - -=begin%> - #below code is commented because it can be used later. It is a field for organisation selection. - <%= render "components/autocomplete", - container_id: "case-contacts-organisation-field", - label_text: I18n.t("support.case_additional_contact.organisation.header"), - label_class: "govuk_text_field", - element_id: "additional_contacts-autocomplete", - element_name: "organisation_name", - template_suggestion: "{{autocomplete_template}}", - value_field: :name, - default_value: form.object.organisation&.name, - hidden_fields: { - 'support_case_additional_contact[organisation_id]' => [:id, form.object.organisation&.id], - # 'case_request[organisation_type]' => [:source, form.object.organisation.class&.name], - }, - query_url: support_establishments_path(format: :json, q: "{{QUERY}}") %> -<% -=end%> - -
- <%= form.govuk_collection_check_boxes :role, role_options, :id, :title, legend: { text: "Roles" } %> -
+ <%= form.hidden_field :support_case_id, value: @current_case.id %>
diff --git a/app/views/support/cases/contact_details/edit.html.erb b/app/views/support/cases/contact_details/edit.html.erb index 173cf8888..c1f89b3db 100644 --- a/app/views/support/cases/contact_details/edit.html.erb +++ b/app/views/support/cases/contact_details/edit.html.erb @@ -8,26 +8,7 @@ <%= form.govuk_text_field :phone_number, width: 'one-quarter', label: { text: I18n.t("support.case_contact_details.label.phone") } %> <%= form.govuk_text_field :extension_number, width: 'one-quarter', label: { text: I18n.t("support.case_contact_details.label.extension_number") } %> <%= form.govuk_text_field :email, width: 'one-half', label: { text: I18n.t("support.case_contact_details.label.email") } %> - <% -=begin%> - #below code is commented because it can be used later. It is a field for organisation selection. - <%= render "components/autocomplete", - container_id: "case-contacts-organisation-field", - label_text: I18n.t("support.case_additional_contact.organisation.header"), - label_class: "govuk_text_field", - element_id: "additional_contacts-autocomplete", - element_name: "organisation_name", - template_suggestion: "{{autocomplete_template}}", - value_field: :name, - default_value: @current_case&.organisation&.name, - hidden_fields: { - 'case_contact_details_form[organisation_id]' => :id, - 'case_contact_details_form[organisation_type]' => :source, - }, - query_url: support_establishments_path(format: :json, q: "{{QUERY}}") %> -<% -=end%> Roles
diff --git a/app/views/support/cases/school_details/show.html.erb b/app/views/support/cases/school_details/show.html.erb index 9b85973e8..63b085480 100644 --- a/app/views/support/cases/school_details/show.html.erb +++ b/app/views/support/cases/school_details/show.html.erb @@ -113,26 +113,6 @@
<% end %> - <% -=begin%> - # This is temporarily removed, will be used later. - <% if @current_case.eligible_for_school_picker? %> -
-
- <%= I18n.t("support.case.label.non_participating_schools") %> -
-
- <%= @current_case.other_school_urns.size %> -
-
- <%= link_to I18n.t("support.generic.view"), non_beneficiery_schools_support_case_school_details_other_schools_path(@current_case), class: "govuk-link", target: "_top"%> -
-
- <% end %> - -<% -=end%> - <% if @current_case.organisation.present? %>