From a594dffed236a48c67acca06fff29a96b6ba6e19 Mon Sep 17 00:00:00 2001 From: wvengen Date: Tue, 30 Sep 2014 15:09:47 +0200 Subject: [PATCH] disable config validation (closes foodcoops#313) --- app/views/admin/configs/show.html.haml | 3 ++- lib/foodsoft_config.rb | 1 + spec/app_config.yml | 6 ------ 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/views/admin/configs/show.html.haml b/app/views/admin/configs/show.html.haml index 671121cc..7f0e1842 100644 --- a/app/views/admin/configs/show.html.haml +++ b/app/views/admin/configs/show.html.haml @@ -1,6 +1,7 @@ - title t('admin.configs.tabs.title'), false -= simple_form_for :config, method: :patch do |f| +-# disable validations, because browsers can't handle inputs hidden in another tab += simple_form_for :config, method: :patch, html: {novalidate: true} do |f| = render 'tabs', url: nil diff --git a/lib/foodsoft_config.rb b/lib/foodsoft_config.rb index 665abfaf..e3f47f66 100644 --- a/lib/foodsoft_config.rb +++ b/lib/foodsoft_config.rb @@ -225,6 +225,7 @@ class FoodsoftConfig currency_unit: '€', currency_space: true, foodsoft_url: 'https://github.com/foodcoops/foodsoft', + contact: {}, # avoid errors when undefined # The following keys cannot, by default, be set by foodcoops themselves. protected: { multi_coop_install: true, diff --git a/spec/app_config.yml b/spec/app_config.yml index 5da8aa3c..0bf51d41 100644 --- a/spec/app_config.yml +++ b/spec/app_config.yml @@ -8,13 +8,7 @@ default: &defaults multi_coop_install: false default_scope: 'f' - name: FC Minimal - contact: - email: fc@minimal.test - - # required by configuration form (but otherwise not) - homepage: http://www.minimal.test/ # true by default to keep compat with older installations, but test with false here use_nick: false