diff --git a/app/views/admin/terms_of_service_files/show.html.haml b/app/views/admin/terms_of_service_files/show.html.haml index fd78d4e7ee..68373724a0 100644 --- a/app/views/admin/terms_of_service_files/show.html.haml +++ b/app/views/admin/terms_of_service_files/show.html.haml @@ -14,6 +14,6 @@ = t(".using_default_terms_html", tos_link: link_to_platform_terms) = form_for [main_app, :admin, @new_file] do |f| - = f.label :attachment + = f.label :attachment, t(".attachment") = f.file_field :attachment - = f.submit + = f.submit t(".create_terms_of_service") diff --git a/config/locales/en.yml b/config/locales/en.yml index d54cf9ecdb..b13fc82203 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -542,6 +542,8 @@ en: terms_of_service: "Terms of Service" delete: "Delete file" confirm_delete: "Are you sure you want to delete the current Terms of Service file?" + attachment: "Attachment" + create_terms_of_service: "Create Terms of service file" number_localization: number_localization_settings: "Number Localization Settings" enable_localized_number: "Use the international thousand/decimal separator logic" diff --git a/spec/system/admin/configuration/terms_of_service_files_spec.rb b/spec/system/admin/configuration/terms_of_service_files_spec.rb index c6918a263b..a75618b56c 100644 --- a/spec/system/admin/configuration/terms_of_service_files_spec.rb +++ b/spec/system/admin/configuration/terms_of_service_files_spec.rb @@ -34,7 +34,8 @@ describe "Terms of Service files" do it "can delete the current file", js: true do attachment = File.open(Rails.root.join(test_file_path)) - TermsOfServiceFile.create!(attachment: attachment) + file = Rack::Test::UploadedFile.new(attachment, "application/pdf") + TermsOfServiceFile.create!(attachment: file) visit admin_terms_of_service_files_path