mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Handle user clicking upload button early
This commit is contained in:
@@ -15,6 +15,9 @@ module Admin
|
||||
def create
|
||||
TermsOfServiceFile.create!(file_params)
|
||||
redirect_to main_app.admin_terms_of_service_files_path
|
||||
rescue ActionController::ParameterMissing
|
||||
flash[:error] = t(".select_file")
|
||||
redirect_to main_app.admin_terms_of_service_files_path
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
||||
@@ -449,6 +449,8 @@ en:
|
||||
embedded_shopfronts_whitelist: "External Domains Whitelist"
|
||||
|
||||
terms_of_service_files:
|
||||
create:
|
||||
select_file: "Please select a file first."
|
||||
show:
|
||||
title: "Terms of Service files"
|
||||
no_files: "No terms of services have been uploaded yet."
|
||||
|
||||
Reference in New Issue
Block a user