optimacms_options 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +20 -20
- data/Rakefile +37 -37
- data/app/assets/javascripts/optimacms_options/application.js +13 -13
- data/app/assets/stylesheets/optimacms_options/application.css +15 -15
- data/app/controllers/optimacms_options/admin/options_controller.rb +161 -161
- data/app/helpers/optimacms_options/application_helper.rb +4 -4
- data/app/helpers/optimacms_options/filter_helper.rb +17 -17
- data/app/views/layouts/optimacms_options/application.html.erb +14 -14
- data/app/views/optimacms_options/admin/options/_form.html.haml +16 -16
- data/app/views/optimacms_options/admin/options/edit.html.haml +2 -2
- data/app/views/optimacms_options/admin/options/index.html.haml +41 -41
- data/app/views/optimacms_options/admin/options/new.html.haml +2 -2
- data/config/routes.rb +13 -13
- data/db/migrate/20160125141700_optimacms_options.rb +16 -16
- data/lib/optimacms/admin_menu/admin_menu.rb +22 -22
- data/lib/optimacms_options.rb +6 -6
- data/lib/optimacms_options/engine.rb +38 -38
- data/lib/optimacms_options/version.rb +3 -3
- data/lib/tasks/optimacms_options_tasks.rake +4 -4
- data/spec/dummy/README.rdoc +28 -28
- data/spec/dummy/Rakefile +6 -6
- data/spec/dummy/app/assets/javascripts/application.js +13 -13
- data/spec/dummy/app/assets/stylesheets/application.css +15 -15
- data/spec/dummy/app/controllers/application_controller.rb +5 -5
- data/spec/dummy/app/controllers/debug_controller.rb +38 -38
- data/spec/dummy/app/helpers/application_helper.rb +2 -2
- data/spec/dummy/app/models/concerns/option_concern.rb +11 -11
- data/spec/dummy/app/views/layouts/application.html.erb +14 -14
- data/spec/dummy/bin/bundle +3 -3
- data/spec/dummy/bin/rails +4 -4
- data/spec/dummy/bin/rake +4 -4
- data/spec/dummy/bin/setup +29 -29
- data/spec/dummy/config.ru +4 -4
- data/spec/dummy/config/application.rb +36 -36
- data/spec/dummy/config/boot.rb +5 -5
- data/spec/dummy/config/database.yml +43 -43
- data/spec/dummy/config/environment.rb +5 -5
- data/spec/dummy/config/environments/development.rb +41 -41
- data/spec/dummy/config/environments/production.rb +79 -79
- data/spec/dummy/config/environments/test.rb +42 -42
- data/spec/dummy/config/initializers/assets.rb +11 -11
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -7
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -3
- data/spec/dummy/config/initializers/devise.rb +265 -265
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -4
- data/spec/dummy/config/initializers/inflections.rb +16 -16
- data/spec/dummy/config/initializers/kaminari_config.rb +10 -10
- data/spec/dummy/config/initializers/mime_types.rb +4 -4
- data/spec/dummy/config/initializers/redis.rb +1 -1
- data/spec/dummy/config/initializers/session_store.rb +3 -3
- data/spec/dummy/config/initializers/simple_form.rb +166 -166
- data/spec/dummy/config/initializers/simple_form_bootstrap.rb +136 -136
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -14
- data/spec/dummy/config/locales/devise.en.yml +62 -62
- data/spec/dummy/config/locales/en.yml +23 -23
- data/spec/dummy/config/routes.rb +18 -18
- data/spec/dummy/config/secrets.yml +25 -25
- data/spec/dummy/db/schema.rb +176 -176
- data/spec/dummy/lib/optimacms/admin_menu/admin_menu.rb +22 -22
- data/spec/dummy/public/404.html +67 -67
- data/spec/dummy/public/422.html +67 -67
- data/spec/dummy/public/500.html +66 -66
- metadata +49 -297
- data/spec/dummy/log/development.log +0 -1747
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_alerts.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_badges.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_breadcrumbs.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_button-groups.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_buttons.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_carousel.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_close.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_code.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_component-animations.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_dropdowns.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_forms.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_glyphicons.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_grid.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_input-groups.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_jumbotron.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_labels.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_list-group.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_media.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_mixins.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_modals.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_navbar.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_navs.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_normalize.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_pager.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_pagination.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_panels.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_popovers.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_print.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_progress-bars.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_responsive-embed.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_responsive-utilities.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_scaffolding.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_tables.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_thumbnails.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_tooltip.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_type.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_utilities.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_variables.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_wells.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_alerts.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_background-variant.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_border-radius.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_buttons.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_center-block.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_clearfix.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_forms.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_gradients.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_grid-framework.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_grid.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_hide-text.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_image.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_labels.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_list-group.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_nav-divider.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_nav-vertical-align.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_opacity.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_pagination.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_panels.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_progress-bar.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_reset-filter.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_resize.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_responsive-visibility.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_size.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_tab-focus.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_table-row.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_text-emphasis.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_text-overflow.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_vendor-prefixes.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6ed128e433a3e2eab57ed9ae5f432cbab6ca4167/font-awesome.css.erbc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/a47a571d26f40d72e4497e6da07dd683983a63b9/noskin.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c45ecb3d10649195657aa8f13c46899f656eedcf/admin.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c45ecb3d10649195657aa8f13c46899f656eedcf/admin_tpl.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c45ecb3d10649195657aa8f13c46899f656eedcf/bootstrap_and_overrides.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c45ecb3d10649195657aa8f13c46899f656eedcf/bootstrap_custom.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c45ecb3d10649195657aa8f13c46899f656eedcf/bootstrap_variables.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c45ecb3d10649195657aa8f13c46899f656eedcf/colors.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c45ecb3d10649195657aa8f13c46899f656eedcf/tpl.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0096b3abe9e696ba1341fdf5fc943c43 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/036aa2938b562b210d90b02a48a2cbbf +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/053f826d1ea01a2fac355de0755e5c40 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/15445a0686472faa0d404f3919935868 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2a215b5ed77dc9f1cdf1e93604bb281f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/322158d4d6be6b20fdcd9adaeb41f1b0 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/3240ef40c1dc9d13156bbd790ec2651a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4d46ce1560a6be13a9a86127383a6c42 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4fabda5d21695272630e1d224064b588 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/529a74a4530de52f6c3ebbf107ffe9f2 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/599b9a466c30f973de55b377f6dcb8a6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5ed2698a8f2e14313e56bf216cfc9e7c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/620684c8c287dfd4094c2d0fa732e283 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/648b944dea9bf325c0b7b1fb075d5e96 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6a506ac52ade0ada16f4ecd5d70b66dd +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6cdbd6f171a27a578bcb07dd5bfa83a2 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6f943f22c610e6417422e4a13e0bcc0d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/721d6e4f84789fa4fb35457b69eb67e5 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/7bcf8e631c4c6ef1a9309400ed610ae1 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/894825d33594984b9a26a8f644e96e35 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8956737a82f17db48d50e13f133aeefc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8b5a7992567ebbeb9a882d074778f8c8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8fb08f5d6d8bcb39342d301caa95dd87 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/91dc3111b0d2d688aba1712ab9c878e4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/936470113fbeb58b0a37b52fdb9f3c95 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/96ef3c76fae58b20328b26b5761ca751 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/99e8d6370ba85ec4a61d953f5ed261af +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9f98a530db67f63b82a81de07801a697 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a64dbcf0e4afe0985b1abd3e209d17cd +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/aa58fb159780a7200a1bc4c6844cc5c4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ab7af7f8d44858097315fccf3f3a76bb +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/abee703ecf82928fbab34c8117189711 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b1e06f52048dca656cfc1545c6da0e98 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b7aa181369305785a973d277de1e9a53 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b84b563223b407a2d395e45b8bc15177 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b9e034dd819b5d19e1f00e65f18a4148 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ba9859d0d2b7d4d7d5b03ff3a71ed478 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/bcf32667baee4291094d671b6525f7bf +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c0218f3ef5e0a446b2092df205929cf4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c9a04033390864f7e3a7896cd11e069e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/db10255455c9ddf7ba65c112e8e4ccac +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e3dd086dd858b5bff9cfd60a031c2091 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e826b33ffd3a105771116e5fe8794059 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e9004898ce4a96e3ffdef8248b6f634a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/fa7a436598a15595baac05d3bc35c469 +0 -0
- data/spec/dummy/tmp/pids/server.pid +0 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Configure sensitive parameters which will be filtered from the log file.
|
4
|
-
Rails.application.config.filter_parameters += [:password]
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
4
|
+
Rails.application.config.filter_parameters += [:password]
|
@@ -1,16 +1,16 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Add new inflection rules using the following format. Inflections
|
4
|
-
# are locale specific, and you may define rules for as many different
|
5
|
-
# locales as you wish. All of these examples are active by default:
|
6
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
-
# inflect.singular /^(ox)en/i, '\1'
|
9
|
-
# inflect.irregular 'person', 'people'
|
10
|
-
# inflect.uncountable %w( fish sheep )
|
11
|
-
# end
|
12
|
-
|
13
|
-
# These inflection rules are supported but not enabled by default:
|
14
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
-
# inflect.acronym 'RESTful'
|
16
|
-
# end
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
4
|
+
# are locale specific, and you may define rules for as many different
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
9
|
+
# inflect.irregular 'person', 'people'
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
11
|
+
# end
|
12
|
+
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
+
# inflect.acronym 'RESTful'
|
16
|
+
# end
|
@@ -1,10 +1,10 @@
|
|
1
|
-
Kaminari.configure do |config|
|
2
|
-
# config.default_per_page = 25
|
3
|
-
# config.max_per_page = nil
|
4
|
-
# config.window = 4
|
5
|
-
# config.outer_window = 0
|
6
|
-
# config.left = 0
|
7
|
-
# config.right = 0
|
8
|
-
#config.page_method_name = :pg
|
9
|
-
config.param_name = :pg
|
10
|
-
end
|
1
|
+
Kaminari.configure do |config|
|
2
|
+
# config.default_per_page = 25
|
3
|
+
# config.max_per_page = nil
|
4
|
+
# config.window = 4
|
5
|
+
# config.outer_window = 0
|
6
|
+
# config.left = 0
|
7
|
+
# config.right = 0
|
8
|
+
#config.page_method_name = :pg
|
9
|
+
config.param_name = :pg
|
10
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Add new mime types for use in respond_to blocks:
|
4
|
-
# Mime::Type.register "text/richtext", :rtf
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new mime types for use in respond_to blocks:
|
4
|
+
# Mime::Type.register "text/richtext", :rtf
|
@@ -1 +1 @@
|
|
1
|
-
#$redis = Redis.new(:host => Rails.configuration.gex_config[:redis_host], :port => 6379)
|
1
|
+
#$redis = Redis.new(:host => Rails.configuration.gex_config[:redis_host], :port => 6379)
|
@@ -1,3 +1,3 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
Rails.application.config.session_store :cookie_store, key: '_dummy_session'
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Rails.application.config.session_store :cookie_store, key: '_dummy_session'
|
@@ -1,166 +1,166 @@
|
|
1
|
-
# Use this setup block to configure all options available in SimpleForm.
|
2
|
-
SimpleForm.setup do |config|
|
3
|
-
# Wrappers are used by the form builder to generate a
|
4
|
-
# complete input. You can remove any component from the
|
5
|
-
# wrapper, change the order or even add your own to the
|
6
|
-
# stack. The options given below are used to wrap the
|
7
|
-
# whole input.
|
8
|
-
config.wrappers :default, class: :input,
|
9
|
-
hint_class: :field_with_hint, error_class: :field_with_errors do |b|
|
10
|
-
## Extensions enabled by default
|
11
|
-
# Any of these extensions can be disabled for a
|
12
|
-
# given input by passing: `f.input EXTENSION_NAME => false`.
|
13
|
-
# You can make any of these extensions optional by
|
14
|
-
# renaming `b.use` to `b.optional`.
|
15
|
-
|
16
|
-
# Determines whether to use HTML5 (:email, :url, ...)
|
17
|
-
# and required attributes
|
18
|
-
b.use :html5
|
19
|
-
|
20
|
-
# Calculates placeholders automatically from I18n
|
21
|
-
# You can also pass a string as f.input placeholder: "Placeholder"
|
22
|
-
b.use :placeholder
|
23
|
-
|
24
|
-
## Optional extensions
|
25
|
-
# They are disabled unless you pass `f.input EXTENSION_NAME => true`
|
26
|
-
# to the input. If so, they will retrieve the values from the model
|
27
|
-
# if any exists. If you want to enable any of those
|
28
|
-
# extensions by default, you can change `b.optional` to `b.use`.
|
29
|
-
|
30
|
-
# Calculates maxlength from length validations for string inputs
|
31
|
-
b.optional :maxlength
|
32
|
-
|
33
|
-
# Calculates pattern from format validations for string inputs
|
34
|
-
b.optional :pattern
|
35
|
-
|
36
|
-
# Calculates min and max from length validations for numeric inputs
|
37
|
-
b.optional :min_max
|
38
|
-
|
39
|
-
# Calculates readonly automatically from readonly attributes
|
40
|
-
b.optional :readonly
|
41
|
-
|
42
|
-
## Inputs
|
43
|
-
b.use :label_input
|
44
|
-
b.use :hint, wrap_with: { tag: :span, class: :hint }
|
45
|
-
b.use :error, wrap_with: { tag: :span, class: :error }
|
46
|
-
|
47
|
-
## full_messages_for
|
48
|
-
# If you want to display the full error message for the attribute, you can
|
49
|
-
# use the component :full_error, like:
|
50
|
-
#
|
51
|
-
# b.use :full_error, wrap_with: { tag: :span, class: :error }
|
52
|
-
end
|
53
|
-
|
54
|
-
# The default wrapper to be used by the FormBuilder.
|
55
|
-
config.default_wrapper = :default
|
56
|
-
|
57
|
-
# Define the way to render check boxes / radio buttons with labels.
|
58
|
-
# Defaults to :nested for bootstrap config.
|
59
|
-
# inline: input + label
|
60
|
-
# nested: label > input
|
61
|
-
config.boolean_style = :nested
|
62
|
-
|
63
|
-
# Default class for buttons
|
64
|
-
config.button_class = 'btn'
|
65
|
-
|
66
|
-
# Method used to tidy up errors. Specify any Rails Array method.
|
67
|
-
# :first lists the first message for each field.
|
68
|
-
# Use :to_sentence to list all errors for each field.
|
69
|
-
# config.error_method = :first
|
70
|
-
|
71
|
-
# Default tag used for error notification helper.
|
72
|
-
config.error_notification_tag = :div
|
73
|
-
|
74
|
-
# CSS class to add for error notification helper.
|
75
|
-
config.error_notification_class = 'error_notification'
|
76
|
-
|
77
|
-
# ID to add for error notification helper.
|
78
|
-
# config.error_notification_id = nil
|
79
|
-
|
80
|
-
# Series of attempts to detect a default label method for collection.
|
81
|
-
# config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
|
82
|
-
|
83
|
-
# Series of attempts to detect a default value method for collection.
|
84
|
-
# config.collection_value_methods = [ :id, :to_s ]
|
85
|
-
|
86
|
-
# You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
|
87
|
-
# config.collection_wrapper_tag = nil
|
88
|
-
|
89
|
-
# You can define the class to use on all collection wrappers. Defaulting to none.
|
90
|
-
# config.collection_wrapper_class = nil
|
91
|
-
|
92
|
-
# You can wrap each item in a collection of radio/check boxes with a tag,
|
93
|
-
# defaulting to :span. Please note that when using :boolean_style = :nested,
|
94
|
-
# SimpleForm will force this option to be a label.
|
95
|
-
# config.item_wrapper_tag = :span
|
96
|
-
|
97
|
-
# You can define a class to use in all item wrappers. Defaulting to none.
|
98
|
-
# config.item_wrapper_class = nil
|
99
|
-
|
100
|
-
# How the label text should be generated altogether with the required text.
|
101
|
-
# config.label_text = lambda { |label, required, explicit_label| "#{required} #{label}" }
|
102
|
-
|
103
|
-
# You can define the class to use on all labels. Default is nil.
|
104
|
-
# config.label_class = nil
|
105
|
-
|
106
|
-
# You can define the default class to be used on forms. Can be overriden
|
107
|
-
# with `html: { :class }`. Defaulting to none.
|
108
|
-
# config.default_form_class = nil
|
109
|
-
|
110
|
-
# You can define which elements should obtain additional classes
|
111
|
-
# config.generate_additional_classes_for = [:wrapper, :label, :input]
|
112
|
-
|
113
|
-
# Whether attributes are required by default (or not). Default is true.
|
114
|
-
# config.required_by_default = true
|
115
|
-
|
116
|
-
# Tell browsers whether to use the native HTML5 validations (novalidate form option).
|
117
|
-
# These validations are enabled in SimpleForm's internal config but disabled by default
|
118
|
-
# in this configuration, which is recommended due to some quirks from different browsers.
|
119
|
-
# To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations,
|
120
|
-
# change this configuration to true.
|
121
|
-
config.browser_validations = false
|
122
|
-
|
123
|
-
# Collection of methods to detect if a file type was given.
|
124
|
-
# config.file_methods = [ :mounted_as, :file?, :public_filename ]
|
125
|
-
|
126
|
-
# Custom mappings for input types. This should be a hash containing a regexp
|
127
|
-
# to match as key, and the input type that will be used when the field name
|
128
|
-
# matches the regexp as value.
|
129
|
-
# config.input_mappings = { /count/ => :integer }
|
130
|
-
|
131
|
-
# Custom wrappers for input types. This should be a hash containing an input
|
132
|
-
# type as key and the wrapper that will be used for all inputs with specified type.
|
133
|
-
# config.wrapper_mappings = { string: :prepend }
|
134
|
-
|
135
|
-
# Namespaces where SimpleForm should look for custom input classes that
|
136
|
-
# override default inputs.
|
137
|
-
# config.custom_inputs_namespaces << "CustomInputs"
|
138
|
-
|
139
|
-
# Default priority for time_zone inputs.
|
140
|
-
# config.time_zone_priority = nil
|
141
|
-
|
142
|
-
# Default priority for country inputs.
|
143
|
-
# config.country_priority = nil
|
144
|
-
|
145
|
-
# When false, do not use translations for labels.
|
146
|
-
# config.translate_labels = true
|
147
|
-
|
148
|
-
# Automatically discover new inputs in Rails' autoload path.
|
149
|
-
# config.inputs_discovery = true
|
150
|
-
|
151
|
-
# Cache SimpleForm inputs discovery
|
152
|
-
# config.cache_discovery = !Rails.env.development?
|
153
|
-
|
154
|
-
# Default class for inputs
|
155
|
-
# config.input_class = nil
|
156
|
-
|
157
|
-
# Define the default class of the input wrapper of the boolean input.
|
158
|
-
config.boolean_label_class = 'checkbox'
|
159
|
-
|
160
|
-
# Defines if the default input wrapper class should be included in radio
|
161
|
-
# collection wrappers.
|
162
|
-
# config.include_default_input_wrapper_class = true
|
163
|
-
|
164
|
-
# Defines which i18n scope will be used in Simple Form.
|
165
|
-
# config.i18n_scope = 'simple_form'
|
166
|
-
end
|
1
|
+
# Use this setup block to configure all options available in SimpleForm.
|
2
|
+
SimpleForm.setup do |config|
|
3
|
+
# Wrappers are used by the form builder to generate a
|
4
|
+
# complete input. You can remove any component from the
|
5
|
+
# wrapper, change the order or even add your own to the
|
6
|
+
# stack. The options given below are used to wrap the
|
7
|
+
# whole input.
|
8
|
+
config.wrappers :default, class: :input,
|
9
|
+
hint_class: :field_with_hint, error_class: :field_with_errors do |b|
|
10
|
+
## Extensions enabled by default
|
11
|
+
# Any of these extensions can be disabled for a
|
12
|
+
# given input by passing: `f.input EXTENSION_NAME => false`.
|
13
|
+
# You can make any of these extensions optional by
|
14
|
+
# renaming `b.use` to `b.optional`.
|
15
|
+
|
16
|
+
# Determines whether to use HTML5 (:email, :url, ...)
|
17
|
+
# and required attributes
|
18
|
+
b.use :html5
|
19
|
+
|
20
|
+
# Calculates placeholders automatically from I18n
|
21
|
+
# You can also pass a string as f.input placeholder: "Placeholder"
|
22
|
+
b.use :placeholder
|
23
|
+
|
24
|
+
## Optional extensions
|
25
|
+
# They are disabled unless you pass `f.input EXTENSION_NAME => true`
|
26
|
+
# to the input. If so, they will retrieve the values from the model
|
27
|
+
# if any exists. If you want to enable any of those
|
28
|
+
# extensions by default, you can change `b.optional` to `b.use`.
|
29
|
+
|
30
|
+
# Calculates maxlength from length validations for string inputs
|
31
|
+
b.optional :maxlength
|
32
|
+
|
33
|
+
# Calculates pattern from format validations for string inputs
|
34
|
+
b.optional :pattern
|
35
|
+
|
36
|
+
# Calculates min and max from length validations for numeric inputs
|
37
|
+
b.optional :min_max
|
38
|
+
|
39
|
+
# Calculates readonly automatically from readonly attributes
|
40
|
+
b.optional :readonly
|
41
|
+
|
42
|
+
## Inputs
|
43
|
+
b.use :label_input
|
44
|
+
b.use :hint, wrap_with: { tag: :span, class: :hint }
|
45
|
+
b.use :error, wrap_with: { tag: :span, class: :error }
|
46
|
+
|
47
|
+
## full_messages_for
|
48
|
+
# If you want to display the full error message for the attribute, you can
|
49
|
+
# use the component :full_error, like:
|
50
|
+
#
|
51
|
+
# b.use :full_error, wrap_with: { tag: :span, class: :error }
|
52
|
+
end
|
53
|
+
|
54
|
+
# The default wrapper to be used by the FormBuilder.
|
55
|
+
config.default_wrapper = :default
|
56
|
+
|
57
|
+
# Define the way to render check boxes / radio buttons with labels.
|
58
|
+
# Defaults to :nested for bootstrap config.
|
59
|
+
# inline: input + label
|
60
|
+
# nested: label > input
|
61
|
+
config.boolean_style = :nested
|
62
|
+
|
63
|
+
# Default class for buttons
|
64
|
+
config.button_class = 'btn'
|
65
|
+
|
66
|
+
# Method used to tidy up errors. Specify any Rails Array method.
|
67
|
+
# :first lists the first message for each field.
|
68
|
+
# Use :to_sentence to list all errors for each field.
|
69
|
+
# config.error_method = :first
|
70
|
+
|
71
|
+
# Default tag used for error notification helper.
|
72
|
+
config.error_notification_tag = :div
|
73
|
+
|
74
|
+
# CSS class to add for error notification helper.
|
75
|
+
config.error_notification_class = 'error_notification'
|
76
|
+
|
77
|
+
# ID to add for error notification helper.
|
78
|
+
# config.error_notification_id = nil
|
79
|
+
|
80
|
+
# Series of attempts to detect a default label method for collection.
|
81
|
+
# config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
|
82
|
+
|
83
|
+
# Series of attempts to detect a default value method for collection.
|
84
|
+
# config.collection_value_methods = [ :id, :to_s ]
|
85
|
+
|
86
|
+
# You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
|
87
|
+
# config.collection_wrapper_tag = nil
|
88
|
+
|
89
|
+
# You can define the class to use on all collection wrappers. Defaulting to none.
|
90
|
+
# config.collection_wrapper_class = nil
|
91
|
+
|
92
|
+
# You can wrap each item in a collection of radio/check boxes with a tag,
|
93
|
+
# defaulting to :span. Please note that when using :boolean_style = :nested,
|
94
|
+
# SimpleForm will force this option to be a label.
|
95
|
+
# config.item_wrapper_tag = :span
|
96
|
+
|
97
|
+
# You can define a class to use in all item wrappers. Defaulting to none.
|
98
|
+
# config.item_wrapper_class = nil
|
99
|
+
|
100
|
+
# How the label text should be generated altogether with the required text.
|
101
|
+
# config.label_text = lambda { |label, required, explicit_label| "#{required} #{label}" }
|
102
|
+
|
103
|
+
# You can define the class to use on all labels. Default is nil.
|
104
|
+
# config.label_class = nil
|
105
|
+
|
106
|
+
# You can define the default class to be used on forms. Can be overriden
|
107
|
+
# with `html: { :class }`. Defaulting to none.
|
108
|
+
# config.default_form_class = nil
|
109
|
+
|
110
|
+
# You can define which elements should obtain additional classes
|
111
|
+
# config.generate_additional_classes_for = [:wrapper, :label, :input]
|
112
|
+
|
113
|
+
# Whether attributes are required by default (or not). Default is true.
|
114
|
+
# config.required_by_default = true
|
115
|
+
|
116
|
+
# Tell browsers whether to use the native HTML5 validations (novalidate form option).
|
117
|
+
# These validations are enabled in SimpleForm's internal config but disabled by default
|
118
|
+
# in this configuration, which is recommended due to some quirks from different browsers.
|
119
|
+
# To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations,
|
120
|
+
# change this configuration to true.
|
121
|
+
config.browser_validations = false
|
122
|
+
|
123
|
+
# Collection of methods to detect if a file type was given.
|
124
|
+
# config.file_methods = [ :mounted_as, :file?, :public_filename ]
|
125
|
+
|
126
|
+
# Custom mappings for input types. This should be a hash containing a regexp
|
127
|
+
# to match as key, and the input type that will be used when the field name
|
128
|
+
# matches the regexp as value.
|
129
|
+
# config.input_mappings = { /count/ => :integer }
|
130
|
+
|
131
|
+
# Custom wrappers for input types. This should be a hash containing an input
|
132
|
+
# type as key and the wrapper that will be used for all inputs with specified type.
|
133
|
+
# config.wrapper_mappings = { string: :prepend }
|
134
|
+
|
135
|
+
# Namespaces where SimpleForm should look for custom input classes that
|
136
|
+
# override default inputs.
|
137
|
+
# config.custom_inputs_namespaces << "CustomInputs"
|
138
|
+
|
139
|
+
# Default priority for time_zone inputs.
|
140
|
+
# config.time_zone_priority = nil
|
141
|
+
|
142
|
+
# Default priority for country inputs.
|
143
|
+
# config.country_priority = nil
|
144
|
+
|
145
|
+
# When false, do not use translations for labels.
|
146
|
+
# config.translate_labels = true
|
147
|
+
|
148
|
+
# Automatically discover new inputs in Rails' autoload path.
|
149
|
+
# config.inputs_discovery = true
|
150
|
+
|
151
|
+
# Cache SimpleForm inputs discovery
|
152
|
+
# config.cache_discovery = !Rails.env.development?
|
153
|
+
|
154
|
+
# Default class for inputs
|
155
|
+
# config.input_class = nil
|
156
|
+
|
157
|
+
# Define the default class of the input wrapper of the boolean input.
|
158
|
+
config.boolean_label_class = 'checkbox'
|
159
|
+
|
160
|
+
# Defines if the default input wrapper class should be included in radio
|
161
|
+
# collection wrappers.
|
162
|
+
# config.include_default_input_wrapper_class = true
|
163
|
+
|
164
|
+
# Defines which i18n scope will be used in Simple Form.
|
165
|
+
# config.i18n_scope = 'simple_form'
|
166
|
+
end
|
@@ -1,136 +1,136 @@
|
|
1
|
-
# Use this setup block to configure all options available in SimpleForm.
|
2
|
-
SimpleForm.setup do |config|
|
3
|
-
config.error_notification_class = 'alert alert-danger'
|
4
|
-
config.button_class = 'btn btn-default'
|
5
|
-
config.boolean_label_class = nil
|
6
|
-
|
7
|
-
config.wrappers :vertical_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
8
|
-
b.use :html5
|
9
|
-
b.use :placeholder
|
10
|
-
b.optional :maxlength
|
11
|
-
b.optional :pattern
|
12
|
-
b.optional :min_max
|
13
|
-
b.optional :readonly
|
14
|
-
b.use :label, class: 'control-label'
|
15
|
-
|
16
|
-
b.use :input, class: 'form-control'
|
17
|
-
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
18
|
-
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
19
|
-
end
|
20
|
-
|
21
|
-
config.wrappers :vertical_file_input, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
22
|
-
b.use :html5
|
23
|
-
b.use :placeholder
|
24
|
-
b.optional :maxlength
|
25
|
-
b.optional :readonly
|
26
|
-
b.use :label, class: 'control-label'
|
27
|
-
|
28
|
-
b.use :input
|
29
|
-
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
30
|
-
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
31
|
-
end
|
32
|
-
|
33
|
-
config.wrappers :vertical_boolean, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
34
|
-
b.use :html5
|
35
|
-
b.optional :readonly
|
36
|
-
|
37
|
-
b.wrapper tag: 'div', class: 'checkbox' do |ba|
|
38
|
-
ba.use :label_input
|
39
|
-
end
|
40
|
-
|
41
|
-
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
42
|
-
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
43
|
-
end
|
44
|
-
|
45
|
-
config.wrappers :vertical_radio_and_checkboxes, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
46
|
-
b.use :html5
|
47
|
-
b.optional :readonly
|
48
|
-
b.use :label, class: 'control-label'
|
49
|
-
b.use :input
|
50
|
-
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
51
|
-
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
52
|
-
end
|
53
|
-
|
54
|
-
config.wrappers :horizontal_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
55
|
-
b.use :html5
|
56
|
-
b.use :placeholder
|
57
|
-
b.optional :maxlength
|
58
|
-
b.optional :pattern
|
59
|
-
b.optional :min_max
|
60
|
-
b.optional :readonly
|
61
|
-
b.use :label, class: 'col-sm-3 control-label'
|
62
|
-
|
63
|
-
b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
|
64
|
-
ba.use :input, class: 'form-control'
|
65
|
-
ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
66
|
-
ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
config.wrappers :horizontal_file_input, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
71
|
-
b.use :html5
|
72
|
-
b.use :placeholder
|
73
|
-
b.optional :maxlength
|
74
|
-
b.optional :readonly
|
75
|
-
b.use :label, class: 'col-sm-3 control-label'
|
76
|
-
|
77
|
-
b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
|
78
|
-
ba.use :input
|
79
|
-
ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
80
|
-
ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
config.wrappers :horizontal_boolean, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
85
|
-
b.use :html5
|
86
|
-
b.optional :readonly
|
87
|
-
|
88
|
-
b.wrapper tag: 'div', class: 'col-sm-offset-3 col-sm-9' do |wr|
|
89
|
-
wr.wrapper tag: 'div', class: 'checkbox' do |ba|
|
90
|
-
ba.use :label_input, class: 'col-sm-9'
|
91
|
-
end
|
92
|
-
|
93
|
-
wr.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
94
|
-
wr.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
|
-
config.wrappers :horizontal_radio_and_checkboxes, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
99
|
-
b.use :html5
|
100
|
-
b.optional :readonly
|
101
|
-
|
102
|
-
b.use :label, class: 'col-sm-3 control-label'
|
103
|
-
|
104
|
-
b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
|
105
|
-
ba.use :input
|
106
|
-
ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
107
|
-
ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
108
|
-
end
|
109
|
-
end
|
110
|
-
|
111
|
-
config.wrappers :inline_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
112
|
-
b.use :html5
|
113
|
-
b.use :placeholder
|
114
|
-
b.optional :maxlength
|
115
|
-
b.optional :pattern
|
116
|
-
b.optional :min_max
|
117
|
-
b.optional :readonly
|
118
|
-
b.use :label, class: 'sr-only'
|
119
|
-
|
120
|
-
b.use :input, class: 'form-control'
|
121
|
-
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
122
|
-
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
123
|
-
end
|
124
|
-
|
125
|
-
# Wrappers for forms and inputs using the Bootstrap toolkit.
|
126
|
-
# Check the Bootstrap docs (http://getbootstrap.com)
|
127
|
-
# to learn about the different styles for forms and inputs,
|
128
|
-
# buttons and other elements.
|
129
|
-
config.default_wrapper = :vertical_form
|
130
|
-
config.wrapper_mappings = {
|
131
|
-
check_boxes: :vertical_radio_and_checkboxes,
|
132
|
-
radio_buttons: :vertical_radio_and_checkboxes,
|
133
|
-
file: :vertical_file_input,
|
134
|
-
boolean: :vertical_boolean,
|
135
|
-
}
|
136
|
-
end
|
1
|
+
# Use this setup block to configure all options available in SimpleForm.
|
2
|
+
SimpleForm.setup do |config|
|
3
|
+
config.error_notification_class = 'alert alert-danger'
|
4
|
+
config.button_class = 'btn btn-default'
|
5
|
+
config.boolean_label_class = nil
|
6
|
+
|
7
|
+
config.wrappers :vertical_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
8
|
+
b.use :html5
|
9
|
+
b.use :placeholder
|
10
|
+
b.optional :maxlength
|
11
|
+
b.optional :pattern
|
12
|
+
b.optional :min_max
|
13
|
+
b.optional :readonly
|
14
|
+
b.use :label, class: 'control-label'
|
15
|
+
|
16
|
+
b.use :input, class: 'form-control'
|
17
|
+
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
18
|
+
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
19
|
+
end
|
20
|
+
|
21
|
+
config.wrappers :vertical_file_input, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
22
|
+
b.use :html5
|
23
|
+
b.use :placeholder
|
24
|
+
b.optional :maxlength
|
25
|
+
b.optional :readonly
|
26
|
+
b.use :label, class: 'control-label'
|
27
|
+
|
28
|
+
b.use :input
|
29
|
+
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
30
|
+
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
31
|
+
end
|
32
|
+
|
33
|
+
config.wrappers :vertical_boolean, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
34
|
+
b.use :html5
|
35
|
+
b.optional :readonly
|
36
|
+
|
37
|
+
b.wrapper tag: 'div', class: 'checkbox' do |ba|
|
38
|
+
ba.use :label_input
|
39
|
+
end
|
40
|
+
|
41
|
+
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
42
|
+
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
43
|
+
end
|
44
|
+
|
45
|
+
config.wrappers :vertical_radio_and_checkboxes, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
46
|
+
b.use :html5
|
47
|
+
b.optional :readonly
|
48
|
+
b.use :label, class: 'control-label'
|
49
|
+
b.use :input
|
50
|
+
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
51
|
+
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
52
|
+
end
|
53
|
+
|
54
|
+
config.wrappers :horizontal_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
55
|
+
b.use :html5
|
56
|
+
b.use :placeholder
|
57
|
+
b.optional :maxlength
|
58
|
+
b.optional :pattern
|
59
|
+
b.optional :min_max
|
60
|
+
b.optional :readonly
|
61
|
+
b.use :label, class: 'col-sm-3 control-label'
|
62
|
+
|
63
|
+
b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
|
64
|
+
ba.use :input, class: 'form-control'
|
65
|
+
ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
66
|
+
ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
config.wrappers :horizontal_file_input, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
71
|
+
b.use :html5
|
72
|
+
b.use :placeholder
|
73
|
+
b.optional :maxlength
|
74
|
+
b.optional :readonly
|
75
|
+
b.use :label, class: 'col-sm-3 control-label'
|
76
|
+
|
77
|
+
b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
|
78
|
+
ba.use :input
|
79
|
+
ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
80
|
+
ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
config.wrappers :horizontal_boolean, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
85
|
+
b.use :html5
|
86
|
+
b.optional :readonly
|
87
|
+
|
88
|
+
b.wrapper tag: 'div', class: 'col-sm-offset-3 col-sm-9' do |wr|
|
89
|
+
wr.wrapper tag: 'div', class: 'checkbox' do |ba|
|
90
|
+
ba.use :label_input, class: 'col-sm-9'
|
91
|
+
end
|
92
|
+
|
93
|
+
wr.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
94
|
+
wr.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
config.wrappers :horizontal_radio_and_checkboxes, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
99
|
+
b.use :html5
|
100
|
+
b.optional :readonly
|
101
|
+
|
102
|
+
b.use :label, class: 'col-sm-3 control-label'
|
103
|
+
|
104
|
+
b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
|
105
|
+
ba.use :input
|
106
|
+
ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
107
|
+
ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
config.wrappers :inline_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
112
|
+
b.use :html5
|
113
|
+
b.use :placeholder
|
114
|
+
b.optional :maxlength
|
115
|
+
b.optional :pattern
|
116
|
+
b.optional :min_max
|
117
|
+
b.optional :readonly
|
118
|
+
b.use :label, class: 'sr-only'
|
119
|
+
|
120
|
+
b.use :input, class: 'form-control'
|
121
|
+
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
122
|
+
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
123
|
+
end
|
124
|
+
|
125
|
+
# Wrappers for forms and inputs using the Bootstrap toolkit.
|
126
|
+
# Check the Bootstrap docs (http://getbootstrap.com)
|
127
|
+
# to learn about the different styles for forms and inputs,
|
128
|
+
# buttons and other elements.
|
129
|
+
config.default_wrapper = :vertical_form
|
130
|
+
config.wrapper_mappings = {
|
131
|
+
check_boxes: :vertical_radio_and_checkboxes,
|
132
|
+
radio_buttons: :vertical_radio_and_checkboxes,
|
133
|
+
file: :vertical_file_input,
|
134
|
+
boolean: :vertical_boolean,
|
135
|
+
}
|
136
|
+
end
|