Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix default page status. Closes #290

Don't allow blank for default page status.
Use 'Draft' i.o. 'draft' in config setup.
  • Loading branch information...
commit b5e80e04fb85266adec11b3453f0dc618fbff6a4 1 parent 93dfbda
@jomz jomz authored
View
2  config/initializers/radiant_config.rb
@@ -4,7 +4,7 @@
config.define 'local.timezone', :allow_change => true, :select_from => lambda { ActiveSupport::TimeZone::MAPPING.keys.sort }
config.define 'defaults.locale', :select_from => lambda { Radiant::AvailableLocales.locales }, :allow_blank => true
config.define 'defaults.page.parts', :default => "Body,Extended"
- config.define 'defaults.page.status', :select_from => lambda { Status.selectable_values }, :allow_blank => true, :default => "Draft"
+ config.define 'defaults.page.status', :select_from => lambda { Status.selectable_values }, :allow_blank => false, :default => "Draft"
config.define 'defaults.page.filter', :select_from => lambda { TextFilter.descendants.map { |s| s.filter_name }.sort }, :allow_blank => true
config.define 'defaults.page.fields'
config.define 'defaults.snippet.filter', :select_from => lambda { TextFilter.descendants.map { |s| s.filter_name }.sort }, :allow_blank => true
View
2  lib/radiant/setup.rb
@@ -48,7 +48,7 @@ def load_default_configuration
step { Radiant::Config['admin.title' ] = 'Radiant CMS' }
step { Radiant::Config['admin.subtitle'] = 'Publishing for Small Teams' }
step { Radiant::Config['defaults.page.parts' ] = 'body, extended' }
- step { Radiant::Config['defaults.page.status' ] = 'draft' }
+ step { Radiant::Config['defaults.page.status' ] = 'Draft' }
step { Radiant::Config['defaults.page.filter' ] = nil }
step { Radiant::Config['defaults.page.fields'] = 'Keywords, Description' }
step { Radiant::Config['session_timeout'] = 2.weeks }
View
5 spec/datasets/config_dataset.rb
@@ -4,10 +4,11 @@ def load
Radiant::Config['admin.title'] = 'Radiant CMS'
Radiant::Config['admin.subtitle'] = 'Publishing for Small Teams'
Radiant::Config['defaults.page.parts'] = 'body, extended'
- Radiant::Config['defaults.page.status'] = 'draft'
+ Radiant::Config['defaults.page.status'] = 'Draft'
Radiant::Config['defaults.page.filter'] = nil
- Radiant::Config['defaults.page.fields'] = 'keywords, description'
+ Radiant::Config['defaults.page.fields'] = 'Keywords, Description'
Radiant::Config['defaults.snippet.filter'] = nil
Radiant::Config['session_timeout'] = 2.weeks
+ Radiant::Config['default_locale'] = 'en'
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.