fat_free_crm 0.19.2 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fat_free_crm might be problematic. Click here for more details.

Files changed (226) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/brakeman-analysis.yml +46 -0
  3. data/.github/workflows/rubocop-analysis.yml +40 -0
  4. data/.github/workflows/ruby.yml +52 -0
  5. data/.rubocop_todo.yml +49 -43
  6. data/.travis.yml +1 -20
  7. data/CHANGELOG.md +13 -0
  8. data/Gemfile +9 -5
  9. data/Gemfile.lock +163 -119
  10. data/README.md +4 -3
  11. data/SECURITY.md +11 -0
  12. data/app/assets/javascripts/application.js.erb +3 -0
  13. data/app/assets/stylesheets/application.css.erb +1 -0
  14. data/app/assets/stylesheets/base.scss +9 -2
  15. data/app/assets/stylesheets/bootstrap-custom.scss +206 -0
  16. data/app/assets/stylesheets/common.scss +87 -67
  17. data/app/assets/stylesheets/header.scss +0 -8
  18. data/app/controllers/admin/field_groups_controller.rb +1 -1
  19. data/app/controllers/admin/fields_controller.rb +1 -1
  20. data/app/controllers/admin/groups_controller.rb +1 -1
  21. data/app/controllers/admin/tags_controller.rb +2 -2
  22. data/app/controllers/admin/users_controller.rb +2 -1
  23. data/app/controllers/application_controller.rb +10 -0
  24. data/app/controllers/comments_controller.rb +1 -1
  25. data/app/controllers/entities/accounts_controller.rb +1 -1
  26. data/app/controllers/entities/campaigns_controller.rb +1 -1
  27. data/app/controllers/home_controller.rb +3 -1
  28. data/app/controllers/lists_controller.rb +1 -1
  29. data/app/controllers/tasks_controller.rb +3 -3
  30. data/app/controllers/users_controller.rb +3 -1
  31. data/app/helpers/accounts_helper.rb +12 -0
  32. data/app/helpers/application_helper.rb +3 -5
  33. data/app/helpers/tasks_helper.rb +2 -2
  34. data/app/models/entities/account.rb +1 -1
  35. data/app/models/entities/account_contact.rb +1 -1
  36. data/app/models/entities/account_opportunity.rb +1 -1
  37. data/app/models/entities/campaign.rb +1 -1
  38. data/app/models/entities/contact.rb +1 -1
  39. data/app/models/entities/lead.rb +1 -1
  40. data/app/models/entities/opportunity.rb +1 -1
  41. data/app/models/fields/custom_field_pair.rb +2 -2
  42. data/app/models/observers/opportunity_observer.rb +1 -1
  43. data/app/models/polymorphic/address.rb +1 -1
  44. data/app/models/polymorphic/comment.rb +1 -1
  45. data/app/models/polymorphic/email.rb +1 -1
  46. data/app/models/polymorphic/task.rb +1 -1
  47. data/app/models/setting.rb +4 -2
  48. data/app/models/users/preference.rb +2 -2
  49. data/app/models/users/user.rb +2 -2
  50. data/app/views/accounts/_edit.html.haml +2 -2
  51. data/app/views/accounts/_new.html.haml +2 -2
  52. data/app/views/accounts/_sidebar_index.html.haml +2 -2
  53. data/app/views/accounts/_sidebar_show.html.haml +19 -19
  54. data/app/views/accounts/create.js.haml +1 -2
  55. data/app/views/accounts/destroy.js.haml +1 -1
  56. data/app/views/accounts/show.html.haml +1 -0
  57. data/app/views/accounts/update.js.haml +2 -3
  58. data/app/views/admin/field_groups/create.js.haml +0 -1
  59. data/app/views/admin/field_groups/destroy.js.haml +0 -1
  60. data/app/views/admin/field_groups/update.js.haml +0 -1
  61. data/app/views/admin/fields/create.js.haml +0 -1
  62. data/app/views/admin/fields/destroy.js.haml +0 -1
  63. data/app/views/admin/fields/update.js.haml +0 -1
  64. data/app/views/admin/groups/create.js.haml +0 -1
  65. data/app/views/admin/groups/destroy.js.haml +0 -1
  66. data/app/views/admin/groups/update.js.haml +0 -1
  67. data/app/views/admin/tags/create.js.haml +0 -1
  68. data/app/views/admin/tags/destroy.js.haml +0 -1
  69. data/app/views/admin/tags/update.js.haml +0 -1
  70. data/app/views/admin/users/create.js.haml +0 -1
  71. data/app/views/admin/users/destroy.js.haml +0 -1
  72. data/app/views/admin/users/update.js.haml +0 -1
  73. data/app/views/campaigns/_edit.html.haml +1 -1
  74. data/app/views/campaigns/_new.html.haml +1 -1
  75. data/app/views/campaigns/_sidebar_index.html.haml +2 -2
  76. data/app/views/campaigns/_sidebar_show.html.haml +68 -67
  77. data/app/views/campaigns/create.js.haml +1 -2
  78. data/app/views/campaigns/destroy.js.haml +1 -1
  79. data/app/views/campaigns/show.html.haml +1 -0
  80. data/app/views/campaigns/update.js.haml +3 -4
  81. data/app/views/comments/_edit.html.haml +1 -1
  82. data/app/views/comments/_new.html.haml +1 -1
  83. data/app/views/comments/update.js.haml +0 -1
  84. data/app/views/contacts/_edit.html.haml +1 -1
  85. data/app/views/contacts/_new.html.haml +1 -1
  86. data/app/views/contacts/_sidebar_show.html.haml +18 -18
  87. data/app/views/contacts/create.js.haml +0 -1
  88. data/app/views/contacts/destroy.js.haml +1 -1
  89. data/app/views/contacts/show.html.haml +1 -0
  90. data/app/views/contacts/update.js.haml +2 -3
  91. data/app/views/entities/_title_bar.html.haml +1 -1
  92. data/app/views/entities/attach.js.haml +2 -2
  93. data/app/views/entities/discard.js.haml +2 -2
  94. data/app/views/home/_opportunity.html.haml +1 -1
  95. data/app/views/home/_task.html.haml +1 -1
  96. data/app/views/home/index.xls.builder +51 -0
  97. data/app/views/layouts/_sidebar.html.haml +2 -2
  98. data/app/views/layouts/_tabbed.html.haml +14 -11
  99. data/app/views/layouts/application.html.haml +2 -2
  100. data/app/views/leads/_edit.html.haml +2 -2
  101. data/app/views/leads/_new.html.haml +2 -2
  102. data/app/views/leads/_sidebar_index.html.haml +2 -2
  103. data/app/views/leads/_sidebar_show.html.haml +30 -30
  104. data/app/views/leads/create.js.haml +2 -3
  105. data/app/views/leads/destroy.js.haml +2 -2
  106. data/app/views/leads/promote.js.haml +3 -4
  107. data/app/views/leads/reject.js.haml +3 -3
  108. data/app/views/leads/show.html.haml +1 -1
  109. data/app/views/leads/update.js.haml +4 -5
  110. data/app/views/lists/create.js.haml +0 -1
  111. data/app/views/opportunities/_edit.html.haml +1 -1
  112. data/app/views/opportunities/_index_brief.html.haml +1 -1
  113. data/app/views/opportunities/_index_long.html.haml +1 -1
  114. data/app/views/opportunities/_new.html.haml +1 -1
  115. data/app/views/opportunities/_sidebar_index.html.haml +2 -2
  116. data/app/views/opportunities/_sidebar_show.html.haml +47 -46
  117. data/app/views/opportunities/create.js.haml +3 -4
  118. data/app/views/opportunities/destroy.js.haml +3 -3
  119. data/app/views/opportunities/show.html.haml +1 -0
  120. data/app/views/opportunities/update.js.haml +5 -6
  121. data/app/views/shared/_inline_styles.html.haml +0 -26
  122. data/app/views/tasks/_assigned.html.haml +1 -1
  123. data/app/views/tasks/_completed.html.haml +1 -1
  124. data/app/views/tasks/_edit.html.haml +1 -1
  125. data/app/views/tasks/_new.html.haml +1 -1
  126. data/app/views/tasks/_pending.html.haml +1 -1
  127. data/app/views/tasks/_related.html.haml +1 -1
  128. data/app/views/tasks/_selector.html.haml +7 -8
  129. data/app/views/tasks/_sidebar_index.html.haml +2 -2
  130. data/app/views/tasks/_title.html.haml +1 -1
  131. data/app/views/tasks/complete.js.haml +1 -1
  132. data/app/views/tasks/create.js.haml +1 -2
  133. data/app/views/tasks/destroy.js.haml +1 -1
  134. data/app/views/tasks/uncomplete.js.haml +1 -2
  135. data/app/views/tasks/update.js.haml +0 -1
  136. data/app/views/users/change_password.js.haml +0 -1
  137. data/app/views/users/update.js.haml +0 -1
  138. data/app/views/users/upload_avatar.js.haml +0 -1
  139. data/app/views/versions/_version_item.html.haml +1 -1
  140. data/bin/setup +6 -6
  141. data/config/application.rb +1 -1
  142. data/config/environment.rb +1 -1
  143. data/config/initializers/content_security_policy.rb +5 -0
  144. data/config/initializers/new_framework_defaults_6_0.rb +46 -0
  145. data/config/initializers/simple_form.rb +135 -55
  146. data/config/initializers/simple_form_bootstrap.rb +433 -0
  147. data/config/locales/fat_free_crm.cs.yml +86 -47
  148. data/config/locales/fat_free_crm.ru.yml +1 -0
  149. data/config/settings.default.yml +0 -41
  150. data/db/migrate/20200806004152_add_pattern_to_fields.rb +7 -0
  151. data/db/migrate/20200806004459_add_html5_to_fields.rb +10 -0
  152. data/db/schema.rb +11 -6
  153. data/fat_free_crm.gemspec +4 -4
  154. data/lib/fat_free_crm/core_ext.rb +1 -1
  155. data/lib/fat_free_crm/gem_ext.rb +0 -1
  156. data/lib/fat_free_crm/tabs.rb +2 -2
  157. data/lib/fat_free_crm/version.rb +2 -2
  158. data/lib/gravatar_image_tag.rb +1 -1
  159. data/lib/tasks/ffcrm/preference_update.rake +19 -0
  160. data/lib/tasks/ffcrm/setup.rake +1 -1
  161. data/lib/templates/erb/scaffold/_form.html.erb +4 -2
  162. data/spec/controllers/comments_controller_spec.rb +6 -6
  163. data/spec/controllers/home_controller_spec.rb +3 -3
  164. data/spec/controllers/users_controller_spec.rb +13 -1
  165. data/spec/factories/user_factories.rb +5 -2
  166. data/spec/features/acceptance_helper.rb +1 -1
  167. data/spec/features/accounts_spec.rb +2 -2
  168. data/spec/features/admin/groups_spec.rb +1 -1
  169. data/spec/features/admin/users_spec.rb +1 -1
  170. data/spec/features/campaigns_spec.rb +2 -2
  171. data/spec/features/contacts_spec.rb +2 -5
  172. data/spec/features/leads_spec.rb +11 -7
  173. data/spec/features/opportunities_spec.rb +4 -4
  174. data/spec/features/support/browser.rb +6 -2
  175. data/spec/features/support/selector_helpers.rb +10 -1
  176. data/spec/features/tasks_spec.rb +6 -6
  177. data/spec/helpers/accounts_helper_spec.rb +57 -0
  178. data/spec/models/entities/opportunity_spec.rb +2 -2
  179. data/spec/models/fields/custom_field_pair_spec.rb +2 -2
  180. data/spec/models/observers/entity_observer_spec.rb +3 -3
  181. data/spec/models/polymorphic/task_spec.rb +11 -11
  182. data/spec/models/polymorphic/version_spec.rb +2 -2
  183. data/spec/models/users/preference_spec.rb +1 -1
  184. data/spec/views/accounts/_edit.haml_spec.rb +1 -1
  185. data/spec/views/accounts/_new.haml_spec.rb +1 -1
  186. data/spec/views/accounts/create.js.haml_spec.rb +0 -1
  187. data/spec/views/accounts/update.js.haml_spec.rb +2 -5
  188. data/spec/views/admin/field_groups/create.js.haml_spec.rb +0 -1
  189. data/spec/views/admin/field_groups/update.js.haml_spec.rb +0 -1
  190. data/spec/views/admin/users/create.js.haml_spec.rb +0 -1
  191. data/spec/views/admin/users/destroy.js.haml_spec.rb +0 -6
  192. data/spec/views/admin/users/update.js.haml_spec.rb +1 -2
  193. data/spec/views/campaigns/_edit.haml_spec.rb +1 -1
  194. data/spec/views/campaigns/_new.haml_spec.rb +1 -1
  195. data/spec/views/campaigns/create.js.haml_spec.rb +0 -1
  196. data/spec/views/campaigns/destroy.js.haml_spec.rb +0 -1
  197. data/spec/views/campaigns/update.js.haml_spec.rb +2 -6
  198. data/spec/views/contacts/_edit.haml_spec.rb +1 -1
  199. data/spec/views/contacts/_new.haml_spec.rb +1 -1
  200. data/spec/views/contacts/create.js.haml_spec.rb +0 -1
  201. data/spec/views/contacts/update.js.haml_spec.rb +3 -7
  202. data/spec/views/home/index.haml_spec.rb +2 -2
  203. data/spec/views/leads/_edit.haml_spec.rb +1 -1
  204. data/spec/views/leads/_new.haml_spec.rb +1 -1
  205. data/spec/views/leads/create.js.haml_spec.rb +0 -3
  206. data/spec/views/leads/destroy.js.haml_spec.rb +0 -2
  207. data/spec/views/leads/promote.js.haml_spec.rb +3 -11
  208. data/spec/views/leads/reject.js.haml_spec.rb +0 -3
  209. data/spec/views/leads/update.js.haml_spec.rb +3 -11
  210. data/spec/views/opportunities/_edit.haml_spec.rb +1 -1
  211. data/spec/views/opportunities/_new.haml_spec.rb +1 -1
  212. data/spec/views/opportunities/create.js.haml_spec.rb +0 -2
  213. data/spec/views/opportunities/destroy.js.haml_spec.rb +0 -3
  214. data/spec/views/opportunities/update.js.haml_spec.rb +3 -11
  215. data/spec/views/tasks/_edit.haml_spec.rb +1 -1
  216. data/spec/views/tasks/complete.js.haml_spec.rb +0 -1
  217. data/spec/views/tasks/create.js.haml_spec.rb +0 -2
  218. data/spec/views/tasks/destroy.js.haml_spec.rb +0 -1
  219. data/spec/views/tasks/uncomplete.js.haml_spec.rb +0 -1
  220. data/spec/views/tasks/update.js.haml_spec.rb +1 -4
  221. data/spec/views/users/change_password.js.haml_spec.rb +1 -2
  222. data/spec/views/users/update.js.haml_spec.rb +1 -2
  223. data/spec/views/users/upload_avatar.js.haml_spec.rb +1 -2
  224. metadata +23 -14
  225. data/config/initializers/new_framework_defaults_5_2.rb +0 -40
  226. data/lib/fat_free_crm/gem_ext/simple_form/action_view_extensions/form_helper.rb +0 -24
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fat_free_crm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.2
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Dvorkin
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-05-09 00:00:00.000000000 Z
13
+ date: 2021-10-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: 5.2.0
21
+ version: 6.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: 5.2.0
28
+ version: 6.0.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rails-i18n
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -88,14 +88,14 @@ dependencies:
88
88
  requirements:
89
89
  - - "~>"
90
90
  - !ruby/object:Gem::Version
91
- version: '2.0'
91
+ version: '3.0'
92
92
  type: :runtime
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - "~>"
97
97
  - !ruby/object:Gem::Version
98
- version: '2.0'
98
+ version: '3.0'
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: jquery-rails
101
101
  requirement: !ruby/object:Gem::Requirement
@@ -200,14 +200,14 @@ dependencies:
200
200
  requirements:
201
201
  - - "~>"
202
202
  - !ruby/object:Gem::Version
203
- version: 10.0.0
203
+ version: 12.0.0
204
204
  type: :runtime
205
205
  prerelease: false
206
206
  version_requirements: !ruby/object:Gem::Requirement
207
207
  requirements:
208
208
  - - "~>"
209
209
  - !ruby/object:Gem::Version
210
- version: 10.0.0
210
+ version: 12.0.0
211
211
  - !ruby/object:Gem::Dependency
212
212
  name: devise
213
213
  requirement: !ruby/object:Gem::Requirement
@@ -240,16 +240,16 @@ dependencies:
240
240
  name: acts_as_commentable
241
241
  requirement: !ruby/object:Gem::Requirement
242
242
  requirements:
243
- - - ">="
243
+ - - "~>"
244
244
  - !ruby/object:Gem::Version
245
- version: '0'
245
+ version: 6.0.0
246
246
  type: :runtime
247
247
  prerelease: false
248
248
  version_requirements: !ruby/object:Gem::Requirement
249
249
  requirements:
250
- - - ">="
250
+ - - "~>"
251
251
  - !ruby/object:Gem::Version
252
- version: '0'
252
+ version: 6.0.0
253
253
  - !ruby/object:Gem::Dependency
254
254
  name: acts-as-taggable-on
255
255
  requirement: !ruby/object:Gem::Requirement
@@ -518,6 +518,9 @@ extensions: []
518
518
  extra_rdoc_files: []
519
519
  files:
520
520
  - ".docker/nginx/sites-enabled/ffcrm.conf"
521
+ - ".github/workflows/brakeman-analysis.yml"
522
+ - ".github/workflows/rubocop-analysis.yml"
523
+ - ".github/workflows/ruby.yml"
521
524
  - ".gitignore"
522
525
  - ".rubocop.yml"
523
526
  - ".rubocop_todo.yml"
@@ -534,6 +537,7 @@ files:
534
537
  - Procfile
535
538
  - README.md
536
539
  - Rakefile
540
+ - SECURITY.md
537
541
  - Vagrantfile
538
542
  - app/assets/images/1x1.gif
539
543
  - app/assets/images/asterisk.gif
@@ -570,6 +574,7 @@ files:
570
574
  - app/assets/stylesheets/advanced_search.css.scss
571
575
  - app/assets/stylesheets/application.css.erb
572
576
  - app/assets/stylesheets/base.scss
577
+ - app/assets/stylesheets/bootstrap-custom.scss
573
578
  - app/assets/stylesheets/common.scss
574
579
  - app/assets/stylesheets/fields.scss
575
580
  - app/assets/stylesheets/format_buttons.css.scss
@@ -876,6 +881,7 @@ files:
876
881
  - app/views/home/index.html.haml
877
882
  - app/views/home/index.js.haml
878
883
  - app/views/home/index.rss.builder
884
+ - app/views/home/index.xls.builder
879
885
  - app/views/home/options.js.haml
880
886
  - app/views/layouts/500.html.haml
881
887
  - app/views/layouts/_about.html.haml
@@ -1040,13 +1046,14 @@ files:
1040
1046
  - config/initializers/inflections.rb
1041
1047
  - config/initializers/locale.rb
1042
1048
  - config/initializers/mime_types.rb
1043
- - config/initializers/new_framework_defaults_5_2.rb
1049
+ - config/initializers/new_framework_defaults_6_0.rb
1044
1050
  - config/initializers/paginate_arrays.rb
1045
1051
  - config/initializers/ransack.rb
1046
1052
  - config/initializers/relative_url_root.rb
1047
1053
  - config/initializers/secret_token.rb
1048
1054
  - config/initializers/session_store.rb
1049
1055
  - config/initializers/simple_form.rb
1056
+ - config/initializers/simple_form_bootstrap.rb
1050
1057
  - config/initializers/views.rb
1051
1058
  - config/initializers/wrap_parameters.rb
1052
1059
  - config/locales/fat_free_crm.cs.yml
@@ -1160,6 +1167,8 @@ files:
1160
1167
  - db/migrate/20180102075234_add_account_counter_caches.rb
1161
1168
  - db/migrate/20180103223438_add_minlength_to_field.rb
1162
1169
  - db/migrate/20180107082701_authlogic_to_devise.rb
1170
+ - db/migrate/20200806004152_add_pattern_to_fields.rb
1171
+ - db/migrate/20200806004459_add_html5_to_fields.rb
1163
1172
  - db/schema.rb
1164
1173
  - db/seeds.rb
1165
1174
  - db/seeds/fields.rb
@@ -1188,7 +1197,6 @@ files:
1188
1197
  - lib/fat_free_crm/gem_ext/active_support/buffered_logger.rb
1189
1198
  - lib/fat_free_crm/gem_ext/rails/engine.rb
1190
1199
  - lib/fat_free_crm/gem_ext/rake/task.rb
1191
- - lib/fat_free_crm/gem_ext/simple_form/action_view_extensions/form_helper.rb
1192
1200
  - lib/fat_free_crm/i18n.rb
1193
1201
  - lib/fat_free_crm/load_settings.rb
1194
1202
  - lib/fat_free_crm/mail_processor/base.rb
@@ -1210,6 +1218,7 @@ files:
1210
1218
  - lib/tasks/ffcrm/demo.rake
1211
1219
  - lib/tasks/ffcrm/dropbox.rake
1212
1220
  - lib/tasks/ffcrm/missing_translations.rake
1221
+ - lib/tasks/ffcrm/preference_update.rake
1213
1222
  - lib/tasks/ffcrm/secret.rake
1214
1223
  - lib/tasks/ffcrm/settings.rake
1215
1224
  - lib/tasks/ffcrm/setup.rake
@@ -1,40 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Be sure to restart your server when you modify this file.
4
- #
5
- # This file contains migration options to ease your Rails 5.2 upgrade.
6
- #
7
- # Once upgraded flip defaults one by one to migrate to the new default.
8
- #
9
- # Read the Guide for Upgrading Ruby on Rails for more info on each option.
10
-
11
- # Make Active Record use stable #cache_key alongside new #cache_version method.
12
- # This is needed for recyclable cache keys.
13
- # Rails.application.config.active_record.cache_versioning = true
14
-
15
- # Use AES-256-GCM authenticated encryption for encrypted cookies.
16
- # Also, embed cookie expiry in signed or encrypted cookies for increased security.
17
- #
18
- # This option is not backwards compatible with earlier Rails versions.
19
- # It's best enabled when your entire app is migrated and stable on 5.2.
20
- #
21
- # Existing cookies will be converted on read then written with the new scheme.
22
- # Rails.application.config.action_dispatch.use_authenticated_cookie_encryption = true
23
-
24
- # Use AES-256-GCM authenticated encryption as default cipher for encrypting messages
25
- # instead of AES-256-CBC, when use_authenticated_message_encryption is set to true.
26
- # Rails.application.config.active_support.use_authenticated_message_encryption = true
27
-
28
- # Add default protection from forgery to ActionController::Base instead of in
29
- # ApplicationController.
30
- # Rails.application.config.action_controller.default_protect_from_forgery = true
31
-
32
- # Store boolean values are in sqlite3 databases as 1 and 0 instead of 't' and
33
- # 'f' after migrating old data.
34
- Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
35
-
36
- # Use SHA-1 instead of MD5 to generate non-sensitive digests, such as the ETag header.
37
- # Rails.application.config.active_support.use_sha1_digests = true
38
-
39
- # Make `form_with` generate id attributes for any generated HTML tags.
40
- # Rails.application.config.action_view.form_with_generates_ids = true
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright (c) 2008-2013 Michael Dvorkin and contributors.
4
- #
5
- # Fat Free CRM is freely distributable under the terms of MIT license.
6
- # See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
7
- #------------------------------------------------------------------------------
8
- #
9
- # Removes simple_form's css class logic.
10
- module SimpleForm
11
- module ActionViewExtensions
12
- module FormHelper
13
- def simple_form_for(record, options = {}, &block)
14
- options[:builder] ||= SimpleForm::FormBuilder
15
- options[:html] ||= {}
16
- options[:html][:novalidate] = !SimpleForm.browser_validations unless options[:html].key?(:novalidate)
17
-
18
- with_simple_form_field_error_proc do
19
- form_for(record, options, &block)
20
- end
21
- end
22
- end
23
- end
24
- end