ui_bibz 3.0.13 → 4.0.0.beta3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +3 -3
- data/.github/workflows/linter.yml +13 -12
- data/.overcommit.yml +6 -0
- data/.rubocop.yml +6 -0
- data/.ruby-version +1 -1
- data/Gemfile +19 -12
- data/Gemfile.lock +178 -138
- data/app/assets/config/ui_bibz.js +12 -0
- data/app/assets/javascripts/forms/formula.js +82 -0
- data/app/assets/javascripts/forms/input-connected.js +132 -0
- data/app/assets/javascripts/forms/jquery.multi-select-extend.js +52 -0
- data/app/assets/javascripts/forms.js +160 -0
- data/app/assets/javascripts/interfaces.js +56 -0
- data/app/assets/javascripts/tables.js +49 -0
- data/app/assets/javascripts/ui_bibz_js.js +37 -0
- data/app/assets/stylesheets/navigations/_nav.sass +2 -0
- data/app/assets/stylesheets/navigations/_navbar.sass +12 -0
- data/app/assets/stylesheets/navigations/_progress_bar.sass +2 -0
- data/app/assets/stylesheets/navigations/_toolbar.sass +3 -0
- data/app/assets/stylesheets/sass/_boxes.sass +1 -0
- data/app/assets/stylesheets/sass/_containers.sass +2 -0
- data/app/assets/stylesheets/sass/_fixes.sass +2 -0
- data/app/assets/stylesheets/sass/_forms.sass +8 -0
- data/app/assets/stylesheets/sass/_navigations.sass +4 -0
- data/app/assets/stylesheets/sass/_notifications.sass +4 -0
- data/app/assets/stylesheets/sass/_tables.sass +2 -0
- data/app/assets/stylesheets/sass/_variables_mixins_functions.sass +3 -0
- data/app/assets/stylesheets/sass/boxes/_card.sass +4 -0
- data/app/assets/stylesheets/sass/containers/_panel.scss +330 -0
- data/app/assets/stylesheets/sass/forms/_bootstrap_select.sass +5 -0
- data/app/assets/stylesheets/sass/forms/_button.sass +3 -0
- data/app/assets/stylesheets/sass/forms/_date_picker.sass +3 -0
- data/app/assets/stylesheets/sass/forms/_form_check.sass +10 -0
- data/app/assets/stylesheets/sass/forms/_formula_field.sass +17 -0
- data/app/assets/stylesheets/sass/forms/_multiselect.sass +44 -0
- data/app/assets/stylesheets/sass/forms/_range.sass +44 -0
- data/app/assets/stylesheets/sass/forms/_slider.sass +136 -0
- data/app/assets/stylesheets/sass/forms/_surround_field.sass +25 -0
- data/app/assets/stylesheets/sass/notifications/_badge.sass +5 -0
- data/app/assets/stylesheets/sass/notifications/_glyph.sass +3 -0
- data/app/assets/stylesheets/sass/notifications/_star.sass +2 -0
- data/app/assets/stylesheets/sass/notifications/_toast.sass +3 -0
- data/app/assets/stylesheets/sass/tables/_table.sass +39 -0
- data/app/assets/stylesheets/sass/tables/_table_card.sass +39 -0
- data/app/assets/stylesheets/ui_bibz.sass +26 -0
- data/bin/test +3 -5
- data/config/importmap.rb +19 -0
- data/config/initializers/assets.rb +5 -0
- data/config/initializers/will_paginate.rb +1 -3
- data/lib/ui_bibz/builders/data_html_options_builder.rb +118 -0
- data/lib/ui_bibz/builders/html_classes_builder.rb +89 -0
- data/lib/ui_bibz/builders/html_options_builder.rb +22 -0
- data/lib/ui_bibz/factory_methods/component_initialize_factory_method.rb +33 -0
- data/lib/ui_bibz/helpers/ui/core/boxes_helper.rb +12 -12
- data/lib/ui_bibz/helpers/ui/core/forms_helper.rb +50 -50
- data/lib/ui_bibz/helpers/ui/core/icons_helper.rb +6 -6
- data/lib/ui_bibz/helpers/ui/core/layouts_helper.rb +2 -2
- data/lib/ui_bibz/helpers/ui/core/lists_helper.rb +2 -2
- data/lib/ui_bibz/helpers/ui/core/navigations_helper.rb +12 -12
- data/lib/ui_bibz/helpers/ui/core/notifications_helper.rb +4 -4
- data/lib/ui_bibz/helpers/ui/core/windows_helper.rb +10 -2
- data/lib/ui_bibz/helpers/ui/ux_helper.rb +2 -2
- data/lib/ui_bibz/helpers/utils_helper.rb +2 -2
- data/lib/ui_bibz/infos.rb +3 -3
- data/lib/ui_bibz/inputs/ui_bibz_form/ui_bibz_form_builder.rb +12 -12
- data/lib/ui_bibz/inputs/ui_bibz_inputs/collection_input.rb +1 -1
- data/lib/ui_bibz/rails/engine.rb +21 -4
- data/lib/ui_bibz/strategies/component_initialize_abstract_strategy.rb +27 -0
- data/lib/ui_bibz/strategies/component_initialize_block_strategy.rb +31 -0
- data/lib/ui_bibz/strategies/component_initialize_hash_strategy.rb +18 -0
- data/lib/ui_bibz/strategies/component_initialize_standard_strategy.rb +18 -0
- data/lib/ui_bibz/ui/concerns/card_itemable_concern.rb +4 -4
- data/lib/ui_bibz/ui/concerns/notification_concern.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/card.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/card_accordion.rb +4 -4
- data/lib/ui_bibz/ui/core/boxes/card_column.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/card_deck.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/card_grid.rb +0 -3
- data/lib/ui_bibz/ui/core/boxes/card_group.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/components/card_body.rb +9 -9
- data/lib/ui_bibz/ui/core/boxes/components/card_col.rb +2 -2
- data/lib/ui_bibz/ui/core/boxes/components/card_list_group.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/components/card_row.rb +1 -1
- data/lib/ui_bibz/ui/core/component.rb +13 -62
- data/lib/ui_bibz/ui/core/forms/buttons/button.rb +3 -1
- data/lib/ui_bibz/ui/core/forms/buttons/button_group.rb +11 -11
- data/lib/ui_bibz/ui/core/forms/choices/box_switch_field.rb +7 -7
- data/lib/ui_bibz/ui/core/forms/choices/checkbox_field.rb +2 -2
- data/lib/ui_bibz/ui/core/forms/choices/choice_group.rb +5 -6
- data/lib/ui_bibz/ui/core/forms/choices/components/choice.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/dates/date_picker_field.rb +15 -15
- data/lib/ui_bibz/ui/core/forms/dropdowns/components/dropdown_link.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/dropdowns/dropdown.rb +5 -5
- data/lib/ui_bibz/ui/core/forms/numbers/slider_field.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/selects/dropdown_select_field.rb +10 -10
- data/lib/ui_bibz/ui/core/forms/selects/multi_column_field.rb +2 -2
- data/lib/ui_bibz/ui/core/forms/surrounds/surround_field.rb +32 -32
- data/lib/ui_bibz/ui/core/forms/textareas/markdown_editor_field.rb +7 -8
- data/lib/ui_bibz/ui/core/icons/components/glyph_text.rb +1 -1
- data/lib/ui_bibz/ui/core/icons/glyph.rb +4 -3
- data/lib/ui_bibz/ui/core/layouts/row.rb +2 -2
- data/lib/ui_bibz/ui/core/lists/components/list.rb +4 -4
- data/lib/ui_bibz/ui/core/lists/list_group.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/breadcrumb.rb +6 -4
- data/lib/ui_bibz/ui/core/navigations/components/nav_link_span.rb +1 -2
- data/lib/ui_bibz/ui/core/navigations/components/navbar_form.rb +6 -5
- data/lib/ui_bibz/ui/core/navigations/components/toolbar_form.rb +2 -2
- data/lib/ui_bibz/ui/core/navigations/nav.rb +10 -6
- data/lib/ui_bibz/ui/core/navigations/navbar.rb +21 -19
- data/lib/ui_bibz/ui/core/navigations/pagination.rb +3 -3
- data/lib/ui_bibz/ui/core/navigations/toolbar.rb +5 -5
- data/lib/ui_bibz/ui/core/notifications/alert.rb +4 -5
- data/lib/ui_bibz/ui/core/notifications/badge.rb +6 -2
- data/lib/ui_bibz/ui/core/notifications/components/toast_header.rb +1 -1
- data/lib/ui_bibz/ui/core/notifications/progress_bar.rb +3 -3
- data/lib/ui_bibz/ui/core/notifications/toast.rb +8 -9
- data/lib/ui_bibz/ui/core/windows/components/offcanvas_body.rb +47 -0
- data/lib/ui_bibz/ui/core/windows/components/offcanvas_header.rb +54 -0
- data/lib/ui_bibz/ui/core/windows/modal.rb +9 -9
- data/lib/ui_bibz/ui/core/windows/offcanvas.rb +84 -0
- data/lib/ui_bibz/ui/extensions/core/component/glyph_extension.rb +4 -20
- data/lib/ui_bibz/ui/extensions/core/component/klass_extension.rb +11 -19
- data/lib/ui_bibz/ui/extensions/core/forms/connect_extension.rb +1 -1
- data/lib/ui_bibz/ui/ux/containers/components/panel_column.rb +3 -3
- data/lib/ui_bibz/ui/ux/containers/components/panel_deck.rb +3 -3
- data/lib/ui_bibz/ui/ux/containers/components/panel_group.rb +3 -3
- data/lib/ui_bibz/ui/ux/containers/components/panel_header.rb +4 -4
- data/lib/ui_bibz/ui/ux/containers/panel.rb +13 -13
- data/lib/ui_bibz/ui/ux/tables/components/actions.rb +4 -4
- data/lib/ui_bibz/ui/ux/tables/components/column.rb +1 -1
- data/lib/ui_bibz/ui/ux/tables/components/columns.rb +2 -2
- data/lib/ui_bibz/ui/ux/tables/extensions/sortable.rb +1 -1
- data/lib/ui_bibz/ui/ux/tables/table.rb +5 -5
- data/lib/ui_bibz/ui/ux/tables/table_card.rb +6 -6
- data/lib/ui_bibz/ui/ux/tables/table_search_field.rb +1 -1
- data/lib/ui_bibz/utils/breakdown_class_name_generator.rb +3 -3
- data/lib/ui_bibz/utils/screwdriver.rb +1 -1
- data/lib/ui_bibz/view_objects/glyph_component_view_object.rb +38 -0
- data/lib/ui_bibz.rb +25 -0
- data/test/builders/data_html_classes_builder_test.rb +37 -0
- data/test/builders/html_classes_builder_test.rb +76 -0
- data/test/dummy/Rakefile +1 -1
- data/test/dummy/app/assets/stylesheets/application.css +1 -15
- data/test/dummy/app/channels/application_cable/channel.rb +6 -0
- data/test/dummy/app/channels/application_cable/connection.rb +6 -0
- data/test/dummy/app/jobs/application_job.rb +9 -0
- data/test/dummy/app/mailers/application_mailer.rb +6 -0
- data/test/dummy/app/views/layouts/application.html.erb +10 -12
- data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/test/dummy/bin/rails +3 -3
- data/test/dummy/bin/rake +2 -2
- data/test/dummy/bin/setup +12 -12
- data/test/dummy/config/application.rb +13 -17
- data/test/dummy/config/boot.rb +3 -3
- data/test/dummy/config/database.yml +2 -2
- data/test/dummy/config/environment.rb +1 -1
- data/test/dummy/config/environments/development.rb +21 -16
- data/test/dummy/config/environments/production.rb +16 -41
- data/test/dummy/config/environments/test.rb +19 -8
- data/test/dummy/config/importmap.rb +11 -0
- data/test/dummy/config/initializers/content_security_policy.rb +21 -24
- data/test/dummy/config/initializers/filter_parameter_logging.rb +6 -2
- data/test/dummy/config/initializers/inflections.rb +4 -4
- data/test/dummy/config/initializers/permissions_policy.rb +12 -0
- data/test/dummy/config/locales/en.yml +13 -3
- data/test/dummy/config/puma.rb +7 -2
- data/test/dummy/config/storage.yml +5 -5
- data/test/dummy/config.ru +2 -1
- data/test/simple_form_test.rb +24 -24
- data/test/ui/core/boxes/card_test.rb +2 -1
- data/test/ui/core/component_test.rb +2 -2
- data/test/ui/core/forms/buttons/button_group_test.rb +1 -1
- data/test/ui/core/forms/buttons/button_link_test.rb +1 -1
- data/test/ui/core/forms/buttons/button_refresh_test.rb +1 -1
- data/test/ui/core/forms/buttons/button_test.rb +2 -2
- data/test/ui/core/forms/choices/box_switch_field_test.rb +10 -10
- data/test/ui/core/forms/choices/checkbox_field_test.rb +1 -1
- data/test/ui/core/forms/choices/choice_group_test.rb +1 -1
- data/test/ui/core/forms/dropdowns/dropdown_test.rb +1 -1
- data/test/ui/core/forms/numbers/formula_field_test.rb +1 -1
- data/test/ui/core/forms/selects/dropdown_select_field_test.rb +2 -2
- data/test/ui/core/forms/selects/select_field_test.rb +1 -1
- data/test/ui/core/forms/surrounds/surround_field_test.rb +4 -4
- data/test/ui/core/forms/texts/auto_complete_field_test.rb +2 -2
- data/test/ui/core/icons/glyph_test.rb +8 -4
- data/test/ui/core/icons/star_test.rb +12 -6
- data/test/ui/core/navigations/breadcrumb_test.rb +1 -1
- data/test/ui/core/navigations/link_test.rb +1 -1
- data/test/ui/core/navigations/nav_test.rb +11 -0
- data/test/ui/core/notifications/alert_test.rb +1 -1
- data/test/ui/core/notifications/badge_test.rb +3 -3
- data/test/ui/core/notifications/popover_test.rb +4 -4
- data/test/ui/core/notifications/spinner_test.rb +1 -1
- data/test/ui/core/notifications/toast_test.rb +1 -1
- data/test/ui/core/notifications/tooltip_test.rb +4 -4
- data/test/ui/core/windows/offcanvas_test.rb +27 -0
- data/test/ui/ux/containers/panel_test.rb +1 -1
- data/test/ui/ux/tables/table_test.rb +3 -3
- data/test/view_objects/glyph_component_view_object_test.rb +17 -0
- data/ui_bibz.gemspec +6 -20
- data/vendor/assets/fonts/fontawesome/fa-brands-400.ttf +0 -0
- data/vendor/assets/fonts/fontawesome/fa-brands-400.woff2 +0 -0
- data/vendor/assets/fonts/fontawesome/fa-regular-400.ttf +0 -0
- data/vendor/assets/fonts/fontawesome/fa-regular-400.woff2 +0 -0
- data/vendor/assets/fonts/fontawesome/fa-solid-900.ttf +0 -0
- data/vendor/assets/fonts/fontawesome/fa-solid-900.woff2 +0 -0
- data/vendor/assets/fonts/fontawesome/fa-v4compatibility.ttf +0 -0
- data/vendor/assets/fonts/fontawesome/fa-v4compatibility.woff2 +0 -0
- data/vendor/assets/javascripts/bootstrap-markdown.js +1 -1555
- data/vendor/assets/javascripts/bootstrap-multiselect.min.js +40 -1176
- data/vendor/assets/javascripts/bootstrap-switch.min.js +9 -21
- data/vendor/assets/javascripts/bs-custom-file-input.min.js +0 -1
- data/vendor/assets/javascripts/fontawesome/all.js +5977 -0
- data/vendor/assets/javascripts/fontawesome/all.min.js +6 -0
- data/vendor/assets/javascripts/fontawesome/brands.js +749 -0
- data/vendor/assets/javascripts/fontawesome/brands.min.js +6 -0
- data/vendor/assets/javascripts/fontawesome/conflict-detection.js +1138 -0
- data/vendor/assets/javascripts/fontawesome/conflict-detection.min.js +6 -0
- data/vendor/assets/javascripts/fontawesome/fontawesome.js +3126 -0
- data/vendor/assets/javascripts/fontawesome/fontawesome.min.js +6 -0
- data/vendor/assets/javascripts/fontawesome/regular.js +445 -0
- data/vendor/assets/javascripts/fontawesome/regular.min.js +6 -0
- data/vendor/assets/javascripts/fontawesome/solid.js +1672 -0
- data/vendor/assets/javascripts/fontawesome/solid.min.js +6 -0
- data/vendor/assets/javascripts/fontawesome/v4-shims.js +225 -0
- data/vendor/assets/javascripts/fontawesome/v4-shims.min.js +6 -0
- data/vendor/assets/javascripts/fuzzysort.js +562 -0
- data/vendor/assets/javascripts/jquery-3.7.0.min.js +2 -0
- data/vendor/assets/javascripts/jquery.multi-select.min.js +725 -1
- data/vendor/assets/stylesheets/bootstrap-multiselect.sass +115 -0
- data/vendor/assets/stylesheets/bootstrap-switch.scss +211 -0
- data/vendor/assets/stylesheets/fontawesome/_animated.scss +142 -9
- data/vendor/assets/stylesheets/fontawesome/_bordered-pulled.scss +13 -13
- data/vendor/assets/stylesheets/fontawesome/_core.scss +28 -6
- data/vendor/assets/stylesheets/fontawesome/_fixed-width.scss +2 -1
- data/vendor/assets/stylesheets/fontawesome/_functions.scss +57 -0
- data/vendor/assets/stylesheets/fontawesome/_icons.scss +7 -1438
- data/vendor/assets/stylesheets/fontawesome/_list.scss +4 -4
- data/vendor/assets/stylesheets/fontawesome/_mixins.scss +53 -34
- data/vendor/assets/stylesheets/fontawesome/_rotated-flipped.scss +25 -18
- data/vendor/assets/stylesheets/fontawesome/_screen-reader.scss +12 -3
- data/vendor/assets/stylesheets/fontawesome/_shims.scss +640 -664
- data/vendor/assets/stylesheets/fontawesome/_sizing.scss +16 -0
- data/vendor/assets/stylesheets/fontawesome/_stacked.scss +5 -4
- data/vendor/assets/stylesheets/fontawesome/_variables.scss +4896 -1393
- data/vendor/assets/stylesheets/fontawesome/brands.scss +17 -10
- data/vendor/assets/stylesheets/fontawesome/fontawesome.scss +7 -2
- data/vendor/assets/stylesheets/fontawesome/regular.scss +13 -10
- data/vendor/assets/stylesheets/fontawesome/solid.scss +13 -11
- data/vendor/assets/stylesheets/fontawesome/v4-shims.scss +6 -1
- data/vendor/assets/stylesheets/multi-select.css +92 -0
- metadata +120 -348
- data/.gitlab-ci.yml +0 -17
- data/.travis.yml +0 -24
- data/lib/ui_bibz/ui/extensions/core/component/popover_extension.rb +0 -70
- data/structure.md +0 -68
- data/test/dummy/README.rdoc +0 -28
- data/test/dummy/app/assets/javascripts/application.js +0 -13
- data/test/dummy/app/javascripts/packs/index.js +0 -3
- data/test/dummy/config/initializers/application_controller_renderer.rb +0 -9
- data/test/dummy/config/initializers/assets.rb +0 -14
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -8
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -7
- data/test/dummy/config/initializers/mime_types.rb +0 -5
- data/test/dummy/config/initializers/session_store.rb +0 -5
- data/test/dummy/config/initializers/ui_bibz.rb +0 -5
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -16
- data/test/dummy/config/secrets.yml +0 -22
- data/test/dummy/config/spring.rb +0 -8
- data/test/dummy/test/models/user_test.rb +0 -9
- data/vendor/assets/fonts/fa-brands-400.eot +0 -0
- data/vendor/assets/fonts/fa-brands-400.svg +0 -3570
- data/vendor/assets/fonts/fa-brands-400.ttf +0 -0
- data/vendor/assets/fonts/fa-brands-400.woff +0 -0
- data/vendor/assets/fonts/fa-brands-400.woff2 +0 -0
- data/vendor/assets/fonts/fa-regular-400.eot +0 -0
- data/vendor/assets/fonts/fa-regular-400.svg +0 -803
- data/vendor/assets/fonts/fa-regular-400.ttf +0 -0
- data/vendor/assets/fonts/fa-regular-400.woff +0 -0
- data/vendor/assets/fonts/fa-regular-400.woff2 +0 -0
- data/vendor/assets/fonts/fa-solid-900.eot +0 -0
- data/vendor/assets/fonts/fa-solid-900.svg +0 -4938
- data/vendor/assets/fonts/fa-solid-900.ttf +0 -0
- data/vendor/assets/fonts/fa-solid-900.woff +0 -0
- data/vendor/assets/fonts/fa-solid-900.woff2 +0 -0
- data/vendor/assets/javascripts/all.js +0 -4441
- data/vendor/assets/javascripts/all.min.js +0 -5
- data/vendor/assets/stylesheets/all.min.css +0 -5
- data/vendor/assets/stylesheets/fontawesome/_larger.scss +0 -23
- data/vendor/assets/stylesheets/svg-with-js.css +0 -5
- /data/{test/dummy/app/mailers/.keep → app/assets/stylesheets/sass/forms/_dropdown.sass} +0 -0
- /data/{test/dummy/app/views/users/index.html.erb → app/assets/stylesheets/sass/forms/_input_refresh_button.sass} +0 -0
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "active_support/core_ext/integer/time"
|
4
|
+
|
3
5
|
Rails.application.configure do
|
4
6
|
# Settings specified here will take precedence over those in config/application.rb.
|
5
7
|
|
@@ -22,35 +24,29 @@ Rails.application.configure do
|
|
22
24
|
|
23
25
|
# Disable serving static files from the `/public` folder by default since
|
24
26
|
# Apache or NGINX already handles this.
|
25
|
-
config.public_file_server.enabled = ENV[
|
26
|
-
|
27
|
-
# Compress CSS using a preprocessor.
|
28
|
-
# config.assets.css_compressor = :sass
|
29
|
-
|
30
|
-
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
31
|
-
config.assets.compile = false
|
27
|
+
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
|
32
28
|
|
33
29
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
34
|
-
# config.
|
30
|
+
# config.asset_host = "http://assets.example.com"
|
35
31
|
|
36
32
|
# Specifies the header that your server uses for sending files.
|
37
|
-
# config.action_dispatch.x_sendfile_header =
|
38
|
-
# config.action_dispatch.x_sendfile_header =
|
33
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
|
34
|
+
# config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
|
39
35
|
|
40
36
|
# Store uploaded files on the local file system (see config/storage.yml for options).
|
41
37
|
config.active_storage.service = :local
|
42
38
|
|
43
39
|
# Mount Action Cable outside main process or domain.
|
44
40
|
# config.action_cable.mount_path = nil
|
45
|
-
# config.action_cable.url =
|
46
|
-
# config.action_cable.allowed_request_origins = [
|
41
|
+
# config.action_cable.url = "wss://example.com/cable"
|
42
|
+
# config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
|
47
43
|
|
48
44
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
49
45
|
# config.force_ssl = true
|
50
46
|
|
51
|
-
#
|
52
|
-
#
|
53
|
-
config.log_level = :
|
47
|
+
# Include generic and useful information about system operation, but avoid logging too much
|
48
|
+
# information to avoid inadvertent exposure of personally identifiable information (PII).
|
49
|
+
config.log_level = :info
|
54
50
|
|
55
51
|
# Prepend all log lines with the following tags.
|
56
52
|
config.log_tags = [:request_id]
|
@@ -72,15 +68,15 @@ Rails.application.configure do
|
|
72
68
|
# the I18n.default_locale when a translation cannot be found).
|
73
69
|
config.i18n.fallbacks = true
|
74
70
|
|
75
|
-
#
|
76
|
-
config.active_support.
|
71
|
+
# Don't log any deprecations.
|
72
|
+
config.active_support.report_deprecations = false
|
77
73
|
|
78
74
|
# Use default logging formatter so that PID and timestamp are not suppressed.
|
79
|
-
config.log_formatter =
|
75
|
+
config.log_formatter = Logger::Formatter.new
|
80
76
|
|
81
77
|
# Use a different logger for distributed setups.
|
82
|
-
# require
|
83
|
-
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new
|
78
|
+
# require "syslog/logger"
|
79
|
+
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name")
|
84
80
|
|
85
81
|
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
86
82
|
logger = ActiveSupport::Logger.new($stdout)
|
@@ -90,25 +86,4 @@ Rails.application.configure do
|
|
90
86
|
|
91
87
|
# Do not dump schema after migrations.
|
92
88
|
config.active_record.dump_schema_after_migration = false
|
93
|
-
|
94
|
-
# Inserts middleware to perform automatic connection switching.
|
95
|
-
# The `database_selector` hash is used to pass options to the DatabaseSelector
|
96
|
-
# middleware. The `delay` is used to determine how long to wait after a write
|
97
|
-
# to send a subsequent read to the primary.
|
98
|
-
#
|
99
|
-
# The `database_resolver` class is used by the middleware to determine which
|
100
|
-
# database is appropriate to use based on the time delay.
|
101
|
-
#
|
102
|
-
# The `database_resolver_context` class is used by the middleware to set
|
103
|
-
# timestamps for the last write to the primary. The resolver uses the context
|
104
|
-
# class timestamps to determine how long to wait before reading from the
|
105
|
-
# replica.
|
106
|
-
#
|
107
|
-
# By default Rails will store a last write timestamp in the session. The
|
108
|
-
# DatabaseSelector middleware is designed as such you can define your own
|
109
|
-
# strategy for connection switching and pass that into the middleware through
|
110
|
-
# these configuration options.
|
111
|
-
# config.active_record.database_selector = { delay: 2.seconds }
|
112
|
-
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
|
113
|
-
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
|
114
89
|
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "active_support/core_ext/integer/time"
|
4
|
+
|
3
5
|
# The test environment is used exclusively to run your application's
|
4
6
|
# test suite. You never need to work with it otherwise. Remember that
|
5
7
|
# your test database is "scratch space" for the test suite and is wiped
|
@@ -8,18 +10,18 @@
|
|
8
10
|
Rails.application.configure do
|
9
11
|
# Settings specified here will take precedence over those in config/application.rb.
|
10
12
|
|
11
|
-
config.
|
12
|
-
config.
|
13
|
+
# Turn false under Spring and add config.action_view.cache_template_loading = true.
|
14
|
+
config.cache_classes = true
|
13
15
|
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
config.eager_load =
|
16
|
+
# Eager loading loads your whole application. When running a single test locally,
|
17
|
+
# this probably isn't necessary. It's a good idea to do in a continuous integration
|
18
|
+
# system, or in some way before deploying your code.
|
19
|
+
config.eager_load = ENV["CI"].present?
|
18
20
|
|
19
21
|
# Configure public file server for tests with Cache-Control for performance.
|
20
22
|
config.public_file_server.enabled = true
|
21
23
|
config.public_file_server.headers = {
|
22
|
-
|
24
|
+
"Cache-Control" => "public, max-age=#{1.hour.to_i}"
|
23
25
|
}
|
24
26
|
|
25
27
|
# Show full error reports and disable caching.
|
@@ -46,6 +48,15 @@ Rails.application.configure do
|
|
46
48
|
# Print deprecation notices to the stderr.
|
47
49
|
config.active_support.deprecation = :stderr
|
48
50
|
|
51
|
+
# Raise exceptions for disallowed deprecations.
|
52
|
+
config.active_support.disallowed_deprecation = :raise
|
53
|
+
|
54
|
+
# Tell Active Support which deprecation messages to disallow.
|
55
|
+
config.active_support.disallowed_deprecation_warnings = []
|
56
|
+
|
49
57
|
# Raises error for missing translations.
|
50
|
-
# config.
|
58
|
+
# config.i18n.raise_on_missing_translations = true
|
59
|
+
|
60
|
+
# Annotate rendered view with file names.
|
61
|
+
# config.action_view.annotate_rendered_view_with_filenames = true
|
51
62
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Pin npm packages by running ./bin/importmap
|
4
|
+
|
5
|
+
pin 'application', preload: true
|
6
|
+
pin '@hotwired/turbo-rails', to: 'turbo.min.js', preload: true
|
7
|
+
pin '@hotwired/stimulus', to: 'stimulus.min.js', preload: true
|
8
|
+
pin '@hotwired/stimulus-loading', to: 'stimulus-loading.js', preload: true
|
9
|
+
pin_all_from 'app/javascript/controllers', under: 'controllers'
|
10
|
+
pin 'ui_bibz_js', to: 'ui_bibz_js.js', preload: true
|
11
|
+
pin '@rails/ujs', to: 'https://ga.jspm.io/npm:@rails/ujs@7.0.1/lib/assets/compiled/rails-ujs.js'
|
@@ -1,29 +1,26 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# Be sure to restart your server when you modify this file.
|
3
3
|
|
4
|
-
# Define an application-wide content security policy
|
5
|
-
#
|
6
|
-
# https://
|
4
|
+
# Define an application-wide content security policy.
|
5
|
+
# See the Securing Rails Applications Guide for more information:
|
6
|
+
# https://guides.rubyonrails.org/security.html#content-security-policy-header
|
7
7
|
|
8
|
-
# Rails.application.
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
|
16
|
-
#
|
17
|
-
#
|
8
|
+
# Rails.application.configure do
|
9
|
+
# config.content_security_policy do |policy|
|
10
|
+
# policy.default_src :self, :https
|
11
|
+
# policy.font_src :self, :https, :data
|
12
|
+
# policy.img_src :self, :https, :data
|
13
|
+
# policy.object_src :none
|
14
|
+
# policy.script_src :self, :https
|
15
|
+
# policy.style_src :self, :https
|
16
|
+
# # Specify URI for violation reports
|
17
|
+
# # policy.report_uri "/csp-violation-report-endpoint"
|
18
|
+
# end
|
19
|
+
#
|
20
|
+
# # Generate session nonces for permitted importmap and inline scripts
|
21
|
+
# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
|
22
|
+
# config.content_security_policy_nonce_directives = %w(script-src)
|
23
|
+
#
|
24
|
+
# # Report violations without enforcing the policy.
|
25
|
+
# # config.content_security_policy_report_only = true
|
18
26
|
# end
|
19
|
-
|
20
|
-
# If you are using UJS then enable automatic nonce generation
|
21
|
-
# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
|
22
|
-
|
23
|
-
# Set the nonce only to specific directives
|
24
|
-
# Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
|
25
|
-
|
26
|
-
# Report CSP violations to a specified URI
|
27
|
-
# For further information see the following documentation:
|
28
|
-
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
|
29
|
-
# Rails.application.config.content_security_policy_report_only = true
|
@@ -2,5 +2,9 @@
|
|
2
2
|
|
3
3
|
# Be sure to restart your server when you modify this file.
|
4
4
|
|
5
|
-
# Configure
|
6
|
-
|
5
|
+
# Configure parameters to be filtered from the log file. Use this to limit dissemination of
|
6
|
+
# sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
|
7
|
+
# notations and behaviors.
|
8
|
+
Rails.application.config.filter_parameters += %i[
|
9
|
+
passw secret token _key crypt salt certificate otp ssn
|
10
|
+
]
|
@@ -5,13 +5,13 @@
|
|
5
5
|
# are locale specific, and you may define rules for as many different
|
6
6
|
# locales as you wish. All of these examples are active by default:
|
7
7
|
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
8
|
-
# inflect.plural /^(ox)$/i,
|
9
|
-
# inflect.singular /^(ox)en/i,
|
10
|
-
# inflect.irregular
|
8
|
+
# inflect.plural /^(ox)$/i, "\\1en"
|
9
|
+
# inflect.singular /^(ox)en/i, "\\1"
|
10
|
+
# inflect.irregular "person", "people"
|
11
11
|
# inflect.uncountable %w( fish sheep )
|
12
12
|
# end
|
13
13
|
|
14
14
|
# These inflection rules are supported but not enabled by default:
|
15
15
|
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
16
|
-
# inflect.acronym
|
16
|
+
# inflect.acronym "RESTful"
|
17
17
|
# end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Define an application-wide HTTP permissions policy. For further
|
3
|
+
# information see https://developers.google.com/web/updates/2018/06/feature-policy
|
4
|
+
#
|
5
|
+
# Rails.application.config.permissions_policy do |f|
|
6
|
+
# f.camera :none
|
7
|
+
# f.gyroscope :none
|
8
|
+
# f.microphone :none
|
9
|
+
# f.usb :none
|
10
|
+
# f.fullscreen :self
|
11
|
+
# f.payment :self, "https://secure.example.com"
|
12
|
+
# end
|
@@ -4,11 +4,11 @@
|
|
4
4
|
#
|
5
5
|
# To use the locales, use `I18n.t`:
|
6
6
|
#
|
7
|
-
# I18n.t
|
7
|
+
# I18n.t "hello"
|
8
8
|
#
|
9
9
|
# In views, this is aliased to just `t`:
|
10
10
|
#
|
11
|
-
# <%= t(
|
11
|
+
# <%= t("hello") %>
|
12
12
|
#
|
13
13
|
# To use a different locale, set it with `I18n.locale`:
|
14
14
|
#
|
@@ -16,8 +16,18 @@
|
|
16
16
|
#
|
17
17
|
# This would use the information in config/locales/es.yml.
|
18
18
|
#
|
19
|
+
# The following keys must be escaped otherwise they will not be retrieved by
|
20
|
+
# the default I18n backend:
|
21
|
+
#
|
22
|
+
# true, false, on, off, yes, no
|
23
|
+
#
|
24
|
+
# Instead, surround them with single quotes.
|
25
|
+
#
|
26
|
+
# en:
|
27
|
+
# "true": "foo"
|
28
|
+
#
|
19
29
|
# To learn more, please read the Rails Internationalization guide
|
20
|
-
# available at
|
30
|
+
# available at https://guides.rubyonrails.org/i18n.html.
|
21
31
|
|
22
32
|
en:
|
23
33
|
hello: "Hello world"
|
data/test/dummy/config/puma.rb
CHANGED
@@ -10,9 +10,14 @@ max_threads_count = ENV.fetch("RAILS_MAX_THREADS", 5)
|
|
10
10
|
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
|
11
11
|
threads min_threads_count, max_threads_count
|
12
12
|
|
13
|
+
# Specifies the `worker_timeout` threshold that Puma will use to wait before
|
14
|
+
# terminating a worker in development environments.
|
15
|
+
#
|
16
|
+
worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
|
17
|
+
|
13
18
|
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
14
19
|
#
|
15
|
-
port
|
20
|
+
port ENV.fetch("PORT", 3000)
|
16
21
|
|
17
22
|
# Specifies the `environment` that Puma will run in.
|
18
23
|
#
|
@@ -36,5 +41,5 @@ pidfile ENV.fetch("PIDFILE", "tmp/pids/server.pid")
|
|
36
41
|
#
|
37
42
|
# preload_app!
|
38
43
|
|
39
|
-
# Allow puma to be restarted by `rails restart` command.
|
44
|
+
# Allow puma to be restarted by `bin/rails restart` command.
|
40
45
|
plugin :tmp_restart
|
@@ -6,27 +6,27 @@ local:
|
|
6
6
|
service: Disk
|
7
7
|
root: <%= Rails.root.join("storage") %>
|
8
8
|
|
9
|
-
# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
|
9
|
+
# Use bin/rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
|
10
10
|
# amazon:
|
11
11
|
# service: S3
|
12
12
|
# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
|
13
13
|
# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
|
14
14
|
# region: us-east-1
|
15
|
-
# bucket: your_own_bucket
|
15
|
+
# bucket: your_own_bucket-<%= Rails.env %>
|
16
16
|
|
17
17
|
# Remember not to checkin your GCS keyfile to a repository
|
18
18
|
# google:
|
19
19
|
# service: GCS
|
20
20
|
# project: your_project
|
21
21
|
# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
|
22
|
-
# bucket: your_own_bucket
|
22
|
+
# bucket: your_own_bucket-<%= Rails.env %>
|
23
23
|
|
24
|
-
# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
|
24
|
+
# Use bin/rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
|
25
25
|
# microsoft:
|
26
26
|
# service: AzureStorage
|
27
27
|
# storage_account_name: your_account_name
|
28
28
|
# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
|
29
|
-
# container: your_container_name
|
29
|
+
# container: your_container_name-<%= Rails.env %>
|
30
30
|
|
31
31
|
# mirror:
|
32
32
|
# service: Mirror
|
data/test/dummy/config.ru
CHANGED
data/test/simple_form_test.rb
CHANGED
@@ -26,7 +26,7 @@ class SimpleFormTest < ActionView::TestCase
|
|
26
26
|
f.input :name_fr
|
27
27
|
end
|
28
28
|
|
29
|
-
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group string optional user_name_fr\"><label class=\"control-label string optional\" for=\"user_name_fr\">Name fr</label><input class=\"form-control string optional\" type=\"text\" value=\"test1\" name=\"user[name_fr]\" id=\"user_name_fr\" /></div></form>"
|
29
|
+
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" autocomplete=\"off\" /><div class=\"form-group string optional user_name_fr\"><label class=\"control-label string optional\" for=\"user_name_fr\">Name fr</label><input class=\"form-control string optional\" type=\"text\" value=\"test1\" name=\"user[name_fr]\" id=\"user_name_fr\" /></div></form>"
|
30
30
|
|
31
31
|
assert_equal expected, actual
|
32
32
|
end
|
@@ -36,7 +36,7 @@ class SimpleFormTest < ActionView::TestCase
|
|
36
36
|
f.input :name_fr, as: :ui_auto_complete_field, collection: @users, label_method: :name_fr
|
37
37
|
end
|
38
38
|
|
39
|
-
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group ui_auto_complete_field optional user_name_fr\"><label class=\"control-label ui_auto_complete_field optional\" for=\"user_name_fr\">Name fr</label><input type=\"text\" name=\"user[name_fr]\" id=\"user_name_fr\" value=\"test1\" class=\"form-control auto-complete-field\" autocomplete=\"true\" list=\"user_name_fr-datalist\" /><datalist id=\"user_name_fr-datalist\"><option value=\"1\">test1</option>
|
39
|
+
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" autocomplete=\"off\" /><div class=\"form-group ui_auto_complete_field optional user_name_fr\"><label class=\"control-label ui_auto_complete_field optional\" for=\"user_name_fr\">Name fr</label><input type=\"text\" name=\"user[name_fr]\" id=\"user_name_fr\" value=\"test1\" class=\"form-control auto-complete-field\" autocomplete=\"true\" list=\"user_name_fr-datalist\" /><datalist id=\"user_name_fr-datalist\"><option value=\"1\">test1</option>
|
40
40
|
<option value=\"2\">test2</option></datalist></div></form>"
|
41
41
|
|
42
42
|
assert_equal expected, actual
|
@@ -47,7 +47,7 @@ class SimpleFormTest < ActionView::TestCase
|
|
47
47
|
f.input :created_at, as: :ui_date_picker_field
|
48
48
|
end
|
49
49
|
|
50
|
-
expected = '<form class="simple_form edit_user" id="edit_user_1" action="/users/1" accept-charset="UTF-8" method="post"><input type="hidden" name="_method" value="patch" /><div class="form-group ui_date_picker_field optional user_created_at"><label class="control-label ui_date_picker_field optional" for="user_created_at">Created at</label><input type="text" name="user[created_at]" id="user_created_at" value="2017-04-26 14:48:43 UTC" class="ui_date_picker_field optional date_picker form-control" data-date-locale="en" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-today-btn="linked" data-date-toggle-active="true" /></div></form>'
|
50
|
+
expected = '<form class="simple_form edit_user" id="edit_user_1" action="/users/1" accept-charset="UTF-8" method="post"><input type="hidden" name="_method" value="patch" autocomplete="off" /><div class="form-group ui_date_picker_field optional user_created_at"><label class="control-label ui_date_picker_field optional" for="user_created_at">Created at</label><input type="text" name="user[created_at]" id="user_created_at" value="2017-04-26 14:48:43 UTC" class="ui_date_picker_field optional date_picker form-control" data-date-locale="en" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-today-btn="linked" data-date-toggle-active="true" /></div></form>'
|
51
51
|
|
52
52
|
assert_equal expected, actual
|
53
53
|
end
|
@@ -60,7 +60,7 @@ class SimpleFormTest < ActionView::TestCase
|
|
60
60
|
f.input :price, as: :ui_formula_field
|
61
61
|
end
|
62
62
|
|
63
|
-
expected = '<form class="simple_form edit_user" id="edit_user_1" action="/users/1" accept-charset="UTF-8" method="post"><input type="hidden" name="_method" value="patch" /><div class="form-group ui_formula_field optional user_price"><label class="control-label ui_formula_field optional" for="user_price">Price</label><div class="formula_field input-group ui_surround_field"><input type="text" name="user[price_formula]" id="user_price_formula" value="1+2" class="ui_formula_field optional formula-field form-control" formula_field_value="1+2" /><span class="formula-field-sign input-group-text">=</span><input type="text" name="user[price]" id="user_price" value="3.0" class="formula-field-result form-control" readonly="readonly" /><span data-bs-toggle="tooltip" class="formula-field-alert input-group-text"><i class="glyph-danger glyph
|
63
|
+
expected = '<form class="simple_form edit_user" id="edit_user_1" action="/users/1" accept-charset="UTF-8" method="post"><input type="hidden" name="_method" value="patch" autocomplete="off" /><div class="form-group ui_formula_field optional user_price"><label class="control-label ui_formula_field optional" for="user_price">Price</label><div class="formula_field input-group ui_surround_field"><input type="text" name="user[price_formula]" id="user_price_formula" value="1+2" class="ui_formula_field optional formula-field form-control" formula_field_value="1+2" /><span class="formula-field-sign input-group-text">=</span><input type="text" name="user[price]" id="user_price" value="3.0" class="formula-field-result form-control" readonly="readonly" /><span data-bs-toggle="tooltip" class="formula-field-alert input-group-text"><i class="glyph-danger glyph fa-solid fa-exclamation-triangle"></i></span></div></div></form>'
|
64
64
|
|
65
65
|
assert_equal expected, actual
|
66
66
|
end
|
@@ -70,7 +70,7 @@ class SimpleFormTest < ActionView::TestCase
|
|
70
70
|
f.input :name_fr, as: :ui_markdown_editor_field
|
71
71
|
end
|
72
72
|
|
73
|
-
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group ui_markdown_editor_field optional user_name_fr\"><label class=\"control-label ui_markdown_editor_field optional\" for=\"user_name_fr\">Name fr</label><textarea name=\"user[name_fr]\" id=\"user_name_fr\" class=\"ui_markdown_editor_field optional\" data-provide=\"markdown\" data-iconlibrary=\"fa\">
|
73
|
+
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" autocomplete=\"off\" /><div class=\"form-group ui_markdown_editor_field optional user_name_fr\"><label class=\"control-label ui_markdown_editor_field optional\" for=\"user_name_fr\">Name fr</label><textarea name=\"user[name_fr]\" id=\"user_name_fr\" class=\"ui_markdown_editor_field optional\" data-provide=\"markdown\" data-iconlibrary=\"fa\">
|
74
74
|
test1</textarea></div></form>"
|
75
75
|
|
76
76
|
assert_equal expected, actual
|
@@ -81,7 +81,7 @@ test1</textarea></div></form>"
|
|
81
81
|
f.input :name_fr, as: :ui_multi_column_field, collection: @users, label_method: :name_fr
|
82
82
|
end
|
83
83
|
|
84
|
-
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group ui_multi_column_field optional user_name_fr\"><label class=\"control-label ui_multi_column_field optional\" for=\"user_name_fr\">Name fr</label><select name=\"name_fr[]\" id=\"name_fr\" class=\"multi-column-field\" multiple=\"multiple\"><option value=\"1\">test1</option>
|
84
|
+
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" autocomplete=\"off\" /><div class=\"form-group ui_multi_column_field optional user_name_fr\"><label class=\"control-label ui_multi_column_field optional\" for=\"user_name_fr\">Name fr</label><select name=\"name_fr[]\" id=\"name_fr\" class=\"multi-column-field\" multiple=\"multiple\"><option value=\"1\">test1</option>
|
85
85
|
<option value=\"2\">test2</option></select></div></form>"
|
86
86
|
|
87
87
|
assert_equal expected, actual
|
@@ -92,7 +92,7 @@ test1</textarea></div></form>"
|
|
92
92
|
f.input :name_fr, as: :ui_dropdown_select_field, multiple: true, collection: @users, label_method: :name_fr
|
93
93
|
end
|
94
94
|
|
95
|
-
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group ui_dropdown_select_field optional user_name_fr\"><label class=\"control-label ui_dropdown_select_field optional\" for=\"user_name_fr\">Name fr</label><select name=\"user[name_fr][]\" id=\"user_name_fr\" class=\"btn-secondary multi-select-field\" multiple=\"multiple\" data-dropdown-classes=\"dropdown\"><option value=\"1\">test1</option>
|
95
|
+
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" autocomplete=\"off\" /><div class=\"form-group ui_dropdown_select_field optional user_name_fr\"><label class=\"control-label ui_dropdown_select_field optional\" for=\"user_name_fr\">Name fr</label><select name=\"user[name_fr][]\" id=\"user_name_fr\" class=\"btn-secondary multi-select-field\" multiple=\"multiple\" data-dropdown-classes=\"dropdown\"><option value=\"1\">test1</option>
|
96
96
|
<option value=\"2\">test2</option></select></div></form>"
|
97
97
|
|
98
98
|
assert_equal expected, actual
|
@@ -103,7 +103,7 @@ test1</textarea></div></form>"
|
|
103
103
|
f.input :name_fr, as: :ui_dropdown_select_field, multiple: true, collection: @continents, toto: 'lala', grouped: true, group_method: :countries
|
104
104
|
end
|
105
105
|
|
106
|
-
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group ui_dropdown_select_field optional user_name_fr\"><label class=\"control-label ui_dropdown_select_field optional\" for=\"user_name_fr\">Name fr</label><select name=\"user[name_fr][]\" id=\"user_name_fr\" class=\"btn-secondary multi-select-field\" multiple=\"multiple\" data-dropdown-classes=\"dropdown\"><optgroup label=\"Europe\"><option value=\"1\">France</option>
|
106
|
+
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" autocomplete=\"off\" /><div class=\"form-group ui_dropdown_select_field optional user_name_fr\"><label class=\"control-label ui_dropdown_select_field optional\" for=\"user_name_fr\">Name fr</label><select name=\"user[name_fr][]\" id=\"user_name_fr\" class=\"btn-secondary multi-select-field\" multiple=\"multiple\" data-dropdown-classes=\"dropdown\"><optgroup label=\"Europe\"><option value=\"1\">France</option>
|
107
107
|
<option value=\"2\">Deutchland</option></optgroup></select></div></form>"
|
108
108
|
|
109
109
|
assert_equal expected, actual
|
@@ -114,7 +114,7 @@ test1</textarea></div></form>"
|
|
114
114
|
f.input :name_fr, as: :ui_text_field
|
115
115
|
end
|
116
116
|
|
117
|
-
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group ui_text_field optional user_name_fr\"><label class=\"control-label ui_text_field optional\" for=\"user_name_fr\">Name fr</label><input type=\"text\" name=\"user[name_fr]\" id=\"user_name_fr\" value=\"test1\" class=\"form-control string ui_text_field optional\" /></div></form>"
|
117
|
+
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" autocomplete=\"off\" /><div class=\"form-group ui_text_field optional user_name_fr\"><label class=\"control-label ui_text_field optional\" for=\"user_name_fr\">Name fr</label><input type=\"text\" name=\"user[name_fr]\" id=\"user_name_fr\" value=\"test1\" class=\"form-control string ui_text_field optional\" /></div></form>"
|
118
118
|
|
119
119
|
assert_equal expected, actual
|
120
120
|
end
|
@@ -125,7 +125,7 @@ test1</textarea></div></form>"
|
|
125
125
|
f.input :active, as: :ui_box_switch_field, collection: @users, label_method: :name_fr
|
126
126
|
end
|
127
127
|
|
128
|
-
expected = '<form class="simple_form edit_user" id="edit_user_1" action="/users/1" accept-charset="UTF-8" method="post"><input type="hidden" name="_method" value="patch" /><div class="form-group ui_box_switch_field optional user_active"><label class="control-label ui_box_switch_field optional" for="user_active">Active</label><div class="switch-field-container"><input type="hidden" name="user[active]" id="user_active" value="0" /><input type="checkbox" name="user[active]" id="user_active" value="1" class="ui_box_switch_field optional switch-field" checked="checked" /></div></div></form>'
|
128
|
+
expected = '<form class="simple_form edit_user" id="edit_user_1" action="/users/1" accept-charset="UTF-8" method="post"><input type="hidden" name="_method" value="patch" autocomplete="off" /><div class="form-group ui_box_switch_field optional user_active"><label class="control-label ui_box_switch_field optional" for="user_active">Active</label><div class="switch-field-container"><input type="hidden" name="user[active]" id="user_active" value="0" autocomplete="off" /><input type="checkbox" name="user[active]" id="user_active" value="1" class="ui_box_switch_field optional switch-field" checked="checked" /></div></div></form>'
|
129
129
|
|
130
130
|
assert_equal expected, actual
|
131
131
|
end
|
@@ -135,7 +135,7 @@ test1</textarea></div></form>"
|
|
135
135
|
f.input :name_fr, as: :ui_radio_field, label: 'Radio 1', input_html: { id: "radio_1" }
|
136
136
|
end
|
137
137
|
|
138
|
-
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group ui_radio_field optional user_name_fr\"><div class=\"form-check\"><input type=\"radio\" name=\"user[name_fr]\" id=\"radio_1\" value=\"test1\" class=\"ui_radio_field optional form-check-input\" /><label class=\"form-check-label\" for=\"radio_1\">Radio 1</label></div></div></form>"
|
138
|
+
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" autocomplete=\"off\" /><div class=\"form-group ui_radio_field optional user_name_fr\"><div class=\"form-check\"><input type=\"radio\" name=\"user[name_fr]\" id=\"radio_1\" value=\"test1\" class=\"ui_radio_field optional form-check-input\" /><label class=\"form-check-label\" for=\"radio_1\">Radio 1</label></div></div></form>"
|
139
139
|
|
140
140
|
assert_equal expected, actual
|
141
141
|
end
|
@@ -145,7 +145,7 @@ test1</textarea></div></form>"
|
|
145
145
|
f.input :name_fr, as: :ui_select_field, collection: @users, label_method: :name_fr
|
146
146
|
end
|
147
147
|
|
148
|
-
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group ui_select_field optional user_name_fr\"><label class=\"control-label ui_select_field optional\" for=\"user_name_fr\">Name fr</label><select name=\"user[name_fr]\" id=\"user_name_fr\" class=\"form-control select-field form-select\"><option value=\"1\">test1</option>
|
148
|
+
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" autocomplete=\"off\" /><div class=\"form-group ui_select_field optional user_name_fr\"><label class=\"control-label ui_select_field optional\" for=\"user_name_fr\">Name fr</label><select name=\"user[name_fr]\" id=\"user_name_fr\" class=\"form-control select-field form-select\"><option value=\"1\">test1</option>
|
149
149
|
<option value=\"2\">test2</option></select></div></form>"
|
150
150
|
|
151
151
|
assert_equal expected, actual
|
@@ -156,8 +156,8 @@ test1</textarea></div></form>"
|
|
156
156
|
f.input :name_fr, as: :ui_select_field, refresh: { target: { data: [] } }, collection: @users, label_method: :name_fr
|
157
157
|
end
|
158
158
|
|
159
|
-
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group ui_select_field optional user_name_fr\"><label class=\"control-label ui_select_field optional\" for=\"user_name_fr\">Name fr</label><div class=\"field-refresh input-group ui_surround_field\"><select name=\"user[name_fr]\" id=\"user_name_fr\" class=\"form-control select-field form-select\"><option value=\"1\">test1</option>
|
160
|
-
<option value=\"2\">test2</option></select><span data-connect=\"{"events":"click","mode":"remote","target":{"selector":"#user_name_fr","url":"","data":[]}}\" class=\"btn-secondary ui-bibz-connect btn input-refresh-button\"><i class=\"glyph
|
159
|
+
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" autocomplete=\"off\" /><div class=\"form-group ui_select_field optional user_name_fr\"><label class=\"control-label ui_select_field optional\" for=\"user_name_fr\">Name fr</label><div class=\"field-refresh input-group ui_surround_field\"><select name=\"user[name_fr]\" id=\"user_name_fr\" class=\"form-control select-field form-select\"><option value=\"1\">test1</option>
|
160
|
+
<option value=\"2\">test2</option></select><span data-connect=\"{"events":"click","mode":"remote","target":{"selector":"#user_name_fr","url":"","data":[]}}\" class=\"btn-secondary ui-bibz-connect btn input-refresh-button\"><i class=\"glyph fa-solid fa-sync-alt\"></i></span></div></div></form>"
|
161
161
|
|
162
162
|
assert_equal expected, actual
|
163
163
|
end
|
@@ -167,7 +167,7 @@ test1</textarea></div></form>"
|
|
167
167
|
f.input :name_fr, as: :ui_select_field, collection: @continents, toto: 'lala', grouped: true, group_method: :countries
|
168
168
|
end
|
169
169
|
|
170
|
-
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group ui_select_field optional user_name_fr\"><label class=\"control-label ui_select_field optional\" for=\"user_name_fr\">Name fr</label><select name=\"user[name_fr]\" id=\"user_name_fr\" class=\"form-control select-field form-select\"><optgroup label=\"Europe\"><option value=\"1\">France</option>
|
170
|
+
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" autocomplete=\"off\" /><div class=\"form-group ui_select_field optional user_name_fr\"><label class=\"control-label ui_select_field optional\" for=\"user_name_fr\">Name fr</label><select name=\"user[name_fr]\" id=\"user_name_fr\" class=\"form-control select-field form-select\"><optgroup label=\"Europe\"><option value=\"1\">France</option>
|
171
171
|
<option value=\"2\">Deutchland</option></optgroup></select></div></form>"
|
172
172
|
|
173
173
|
assert_equal expected, actual
|
@@ -179,7 +179,7 @@ test1</textarea></div></form>"
|
|
179
179
|
f.input :name_fr, as: :ui_select_field, collection: @countries
|
180
180
|
end
|
181
181
|
|
182
|
-
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group ui_select_field optional user_name_fr\"><label class=\"control-label ui_select_field optional\" for=\"user_name_fr\">Name fr</label><select name=\"user[name_fr]\" id=\"user_name_fr\" class=\"form-control select-field form-select\"><option selected=\"selected\" value=\"1\">France</option>
|
182
|
+
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" autocomplete=\"off\" /><div class=\"form-group ui_select_field optional user_name_fr\"><label class=\"control-label ui_select_field optional\" for=\"user_name_fr\">Name fr</label><select name=\"user[name_fr]\" id=\"user_name_fr\" class=\"form-control select-field form-select\"><option selected=\"selected\" value=\"1\">France</option>
|
183
183
|
<option value=\"2\">Deutchland</option></select></div></form>"
|
184
184
|
|
185
185
|
assert_equal expected, actual
|
@@ -191,7 +191,7 @@ test1</textarea></div></form>"
|
|
191
191
|
f.input :name_fr, as: :ui_select_field, collection: @continents, toto: 'lala', grouped: true, group_method: :countries
|
192
192
|
end
|
193
193
|
|
194
|
-
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group ui_select_field optional user_name_fr\"><label class=\"control-label ui_select_field optional\" for=\"user_name_fr\">Name fr</label><select name=\"user[name_fr]\" id=\"user_name_fr\" class=\"form-control select-field form-select\"><optgroup label=\"Europe\"><option selected=\"selected\" value=\"1\">France</option>
|
194
|
+
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" autocomplete=\"off\" /><div class=\"form-group ui_select_field optional user_name_fr\"><label class=\"control-label ui_select_field optional\" for=\"user_name_fr\">Name fr</label><select name=\"user[name_fr]\" id=\"user_name_fr\" class=\"form-control select-field form-select\"><optgroup label=\"Europe\"><option selected=\"selected\" value=\"1\">France</option>
|
195
195
|
<option value=\"2\">Deutchland</option></optgroup></select></div></form>"
|
196
196
|
|
197
197
|
assert_equal expected, actual
|
@@ -202,7 +202,7 @@ test1</textarea></div></form>"
|
|
202
202
|
f.input :name_fr, as: :ui_number_field
|
203
203
|
end
|
204
204
|
|
205
|
-
expected = '<form class="simple_form edit_user" id="edit_user_1" action="/users/1" accept-charset="UTF-8" method="post"><input type="hidden" name="_method" value="patch" /><div class="form-group ui_number_field optional user_name_fr"><label class="control-label ui_number_field optional" for="user_name_fr">Name fr</label><input type="number" name="user[name_fr]" id="user_name_fr" value="test1" class="form-control ui_number_field optional" /></div></form>'
|
205
|
+
expected = '<form class="simple_form edit_user" id="edit_user_1" action="/users/1" accept-charset="UTF-8" method="post"><input type="hidden" name="_method" value="patch" autocomplete="off" /><div class="form-group ui_number_field optional user_name_fr"><label class="control-label ui_number_field optional" for="user_name_fr">Name fr</label><input type="number" name="user[name_fr]" id="user_name_fr" value="test1" class="form-control ui_number_field optional" /></div></form>'
|
206
206
|
|
207
207
|
assert_equal expected, actual
|
208
208
|
end
|
@@ -212,7 +212,7 @@ test1</textarea></div></form>"
|
|
212
212
|
f.input :name_fr, as: :ui_file_field
|
213
213
|
end
|
214
214
|
|
215
|
-
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group ui_file_field optional user_name_fr\"><label class=\"control-label ui_file_field optional\" for=\"user_name_fr\">Name fr</label><input type=\"file\" name=\"user[name_fr]\" id=\"user_name_fr\" value=\"test1\" class=\"ui_file_field optional form-control\" /></div></form>"
|
215
|
+
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" autocomplete=\"off\" /><div class=\"form-group ui_file_field optional user_name_fr\"><label class=\"control-label ui_file_field optional\" for=\"user_name_fr\">Name fr</label><input type=\"file\" name=\"user[name_fr]\" id=\"user_name_fr\" value=\"test1\" class=\"ui_file_field optional form-control\" /></div></form>"
|
216
216
|
|
217
217
|
assert_equal expected, actual
|
218
218
|
end
|
@@ -222,7 +222,7 @@ test1</textarea></div></form>"
|
|
222
222
|
f.input :name_fr, as: :ui_range_field
|
223
223
|
end
|
224
224
|
|
225
|
-
expected = '<form class="simple_form edit_user" id="edit_user_1" action="/users/1" accept-charset="UTF-8" method="post"><input type="hidden" name="_method" value="patch" /><div class="form-group ui_range_field optional user_name_fr"><label class="control-label ui_range_field optional" for="user_name_fr">Name fr</label><input type="range" name="user[name_fr]" id="user_name_fr" value="test1" class="ui_range_field optional form-range" /></div></form>'
|
225
|
+
expected = '<form class="simple_form edit_user" id="edit_user_1" action="/users/1" accept-charset="UTF-8" method="post"><input type="hidden" name="_method" value="patch" autocomplete="off" /><div class="form-group ui_range_field optional user_name_fr"><label class="control-label ui_range_field optional" for="user_name_fr">Name fr</label><input type="range" name="user[name_fr]" id="user_name_fr" value="test1" class="ui_range_field optional form-range" /></div></form>'
|
226
226
|
|
227
227
|
assert_equal expected, actual
|
228
228
|
end
|
@@ -232,7 +232,7 @@ test1</textarea></div></form>"
|
|
232
232
|
f.input :name_en, as: :ui_slider_field
|
233
233
|
end
|
234
234
|
|
235
|
-
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group ui_slider_field optional user_name_en\"><label class=\"control-label ui_slider_field optional\" for=\"user_name_en\">Name en</label><div class=\"ui_slider_field optional slider\" id=\"user_name_en_slider\"><div><div class=\"slider-inverse-left\" style=\"width: 100%\"></div><div class=\"slider-inverse-right\" style=\"width: 100%\"></div><div class=\"slider-range\" style=\"left: 0%; right: 0%\"></div><div class=\"slider-thumb slider-thumb-left\" style=\"left: 0%\"></div><div class=\"slider-thumb slider-thumb-right\" style=\"left: 100%\"></div></div><input type=\"range\" name=\"user[name_en_min]\" id=\"user_name_en_min\" value=\"0\" max=\"100\" min=\"0\" step=\"1\" /><input type=\"range\" name=\"user[name_en_max]\" id=\"user_name_en_max\" value=\"100\" max=\"100\" min=\"0\" step=\"1\" /></div></div></form>"
|
235
|
+
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" autocomplete=\"off\" /><div class=\"form-group ui_slider_field optional user_name_en\"><label class=\"control-label ui_slider_field optional\" for=\"user_name_en\">Name en</label><div class=\"ui_slider_field optional slider\" id=\"user_name_en_slider\"><div><div class=\"slider-inverse-left\" style=\"width: 100%\"></div><div class=\"slider-inverse-right\" style=\"width: 100%\"></div><div class=\"slider-range\" style=\"left: 0%; right: 0%\"></div><div class=\"slider-thumb slider-thumb-left\" style=\"left: 0%\"></div><div class=\"slider-thumb slider-thumb-right\" style=\"left: 100%\"></div></div><input type=\"range\" name=\"user[name_en_min]\" id=\"user_name_en_min\" value=\"0\" max=\"100\" min=\"0\" step=\"1\" /><input type=\"range\" name=\"user[name_en_max]\" id=\"user_name_en_max\" value=\"100\" max=\"100\" min=\"0\" step=\"1\" /></div></div></form>"
|
236
236
|
|
237
237
|
assert_equal expected, actual
|
238
238
|
end
|
@@ -244,7 +244,7 @@ test1</textarea></div></form>"
|
|
244
244
|
end
|
245
245
|
end
|
246
246
|
|
247
|
-
expected = "<form class=\"simple_form\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"button_group\"><div class=\"btn-group\" role=\"group\"><button class=\"btn-secondary btn\">test</button></div></div></form>"
|
247
|
+
expected = "<form class=\"simple_form\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" autocomplete=\"off\" /><div class=\"button_group\"><div class=\"btn-group\" role=\"group\"><button class=\"btn-secondary btn\">test</button></div></div></form>"
|
248
248
|
|
249
249
|
assert_equal expected, actual
|
250
250
|
end
|
@@ -256,7 +256,7 @@ test1</textarea></div></form>"
|
|
256
256
|
end
|
257
257
|
end
|
258
258
|
|
259
|
-
expected = "<form class=\"simple_form\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"button_group\"><div class=\"btn-group button-choice btn-group-toggle\"><div class=\"form-check\"><input type=\"checkbox\" name=\"user[name_fr]\" id=\"user_name_fr\" value=\"test1\" class=\"ui_checkbox_field optional form-check-input\" checked=\"checked\" /><label class=\"form-check-label\" for=\"user_name_fr\">Name Fr</label></div></div></div></form>"
|
259
|
+
expected = "<form class=\"simple_form\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" autocomplete=\"off\" /><div class=\"button_group\"><div class=\"btn-group button-choice btn-group-toggle\"><div class=\"form-check\"><input type=\"checkbox\" name=\"user[name_fr]\" id=\"user_name_fr\" value=\"test1\" class=\"ui_checkbox_field optional form-check-input\" checked=\"checked\" /><label class=\"form-check-label\" for=\"user_name_fr\">Name Fr</label></div></div></div></form>"
|
260
260
|
|
261
261
|
assert_equal expected, actual
|
262
262
|
end
|
@@ -269,7 +269,7 @@ test1</textarea></div></form>"
|
|
269
269
|
end
|
270
270
|
end
|
271
271
|
|
272
|
-
expected = "<form class=\"simple_form\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group surround_field\"><div class=\"input-group ui_surround_field\"><input type=\"text\" name=\"user[name_en]\" id=\"user_name_en\" value=\"test1 en\" class=\"form-control string ui_text_field optional\" /><span class=\"input-group-text\">€</span></div></div></form>"
|
272
|
+
expected = "<form class=\"simple_form\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" autocomplete=\"off\" /><div class=\"form-group surround_field\"><div class=\"input-group ui_surround_field\"><input type=\"text\" name=\"user[name_en]\" id=\"user_name_en\" value=\"test1 en\" class=\"form-control string ui_text_field optional\" /><span class=\"input-group-text\">€</span></div></div></form>"
|
273
273
|
|
274
274
|
assert_equal expected, actual
|
275
275
|
end
|