decidim-decidim_awesome 0.10.3 → 0.11.1

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

Potentially problematic release.


This version of decidim-decidim_awesome might be problematic. Click here for more details.

Files changed (232) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -5
  3. data/README.md +65 -67
  4. data/app/cells/concerns/decidim/decidim_awesome/global_menu_cell_override.rb +20 -0
  5. data/app/cells/concerns/decidim/decidim_awesome/proposal_l_cell_override.rb +44 -0
  6. data/app/cells/decidim/decidim_awesome/content_blocks/map/show.erb +5 -12
  7. data/app/cells/decidim/decidim_awesome/voting/proposal_metadata_cell.rb +54 -0
  8. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal/modal.erb +18 -0
  9. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal/show.erb +37 -32
  10. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_cell.rb +9 -4
  11. data/app/commands/concerns/decidim/decidim_awesome/admin/needs_constraint_helpers.rb +1 -1
  12. data/app/commands/concerns/decidim/decidim_awesome/proposals/create_proposal_override.rb +2 -2
  13. data/app/commands/concerns/decidim/decidim_awesome/proposals/update_proposal_override.rb +2 -2
  14. data/app/commands/decidim/decidim_awesome/admin/create_constraint.rb +1 -1
  15. data/app/commands/decidim/decidim_awesome/admin/destroy_custom_redirect.rb +1 -1
  16. data/app/commands/decidim/decidim_awesome/admin/destroy_menu_hack.rb +1 -1
  17. data/app/commands/decidim/decidim_awesome/admin/rename_scope_label.rb +1 -1
  18. data/app/commands/decidim/decidim_awesome/admin/update_constraint.rb +1 -1
  19. data/app/commands/decidim/decidim_awesome/admin/update_custom_redirect.rb +2 -2
  20. data/app/commands/decidim/decidim_awesome/command.rb +1 -7
  21. data/app/controllers/concerns/decidim/decidim_awesome/admin/maintenance_context.rb +1 -1
  22. data/app/controllers/concerns/decidim/decidim_awesome/admin_accountability/admin/filterable_helper.rb +3 -4
  23. data/app/controllers/concerns/decidim/decidim_awesome/content_security_policy.rb +34 -0
  24. data/app/controllers/concerns/decidim/decidim_awesome/not_found_redirect.rb +1 -1
  25. data/app/controllers/concerns/decidim/decidim_awesome/proposals/orderable_override.rb +22 -9
  26. data/app/controllers/concerns/decidim/decidim_awesome/proposals/proposal_votes_controller_override.rb +3 -3
  27. data/app/controllers/decidim/decidim_awesome/admin/admin_accountability_controller.rb +7 -7
  28. data/app/controllers/decidim/decidim_awesome/admin/checks_controller.rb +7 -7
  29. data/app/controllers/decidim/decidim_awesome/admin/config_controller.rb +8 -10
  30. data/app/controllers/decidim/decidim_awesome/admin/constraints_controller.rb +20 -19
  31. data/app/controllers/decidim/decidim_awesome/admin/custom_redirects_controller.rb +6 -8
  32. data/app/controllers/decidim/decidim_awesome/admin/maintenance_controller.rb +2 -2
  33. data/app/controllers/decidim/decidim_awesome/admin/menu_hacks_controller.rb +6 -8
  34. data/app/controllers/decidim/decidim_awesome/admin/proposal_custom_fields_controller.rb +2 -2
  35. data/app/controllers/decidim/decidim_awesome/admin/scoped_admins_controller.rb +2 -2
  36. data/app/controllers/decidim/decidim_awesome/admin/scoped_styles_controller.rb +2 -2
  37. data/app/controllers/decidim/decidim_awesome/blank_component_controller.rb +8 -3
  38. data/app/controllers/decidim/decidim_awesome/editor_images_controller.rb +3 -3
  39. data/app/controllers/decidim/decidim_awesome/iframe_component/iframe_controller.rb +11 -5
  40. data/app/forms/concerns/decidim/decidim_awesome/proposals/proposal_wizard_create_step_form_override.rb +1 -1
  41. data/app/forms/decidim/decidim_awesome/admin/config_form.rb +13 -25
  42. data/app/forms/decidim/decidim_awesome/admin/custom_redirect_form.rb +2 -2
  43. data/app/forms/decidim/decidim_awesome/admin/intergram_form.rb +4 -0
  44. data/app/forms/decidim/decidim_awesome/admin/menu_form.rb +4 -4
  45. data/app/helpers/concerns/decidim/decidim_awesome/amendments_helper_override.rb +8 -1
  46. data/app/helpers/concerns/decidim/decidim_awesome/breadcrumb_helper_override.rb +23 -0
  47. data/app/helpers/concerns/decidim/decidim_awesome/proposals/application_helper_override.rb +23 -39
  48. data/app/helpers/decidim/decidim_awesome/admin/config_constraints_helpers.rb +2 -2
  49. data/app/helpers/decidim/decidim_awesome/map_helper.rb +8 -27
  50. data/app/jobs/decidim/decidim_awesome/migrate_legacy_images_job.rb +5 -4
  51. data/app/middleware/decidim/decidim_awesome/current_config.rb +3 -5
  52. data/app/models/concerns/decidim/decidim_awesome/has_proposal_extra_fields.rb +1 -1
  53. data/app/models/decidim/decidim_awesome/awesome_config.rb +1 -1
  54. data/app/models/decidim/decidim_awesome/paper_trail_version.rb +4 -8
  55. data/app/models/decidim/decidim_awesome/proposal_extra_field.rb +1 -1
  56. data/app/models/decidim/decidim_awesome/vote_weight.rb +2 -2
  57. data/app/overrides/decidim/proposals/proposals/{show → _proposal_aside}/limit_amendments_modal.html.erb.deface +1 -1
  58. data/app/overrides/decidim/proposals/proposals/_vote_button/replace_vote_button.html.erb.deface +1 -1
  59. data/app/overrides/layouts/decidim/_decidim_javascript/add_awesome_tags.html.erb.deface +6 -0
  60. data/app/overrides/layouts/decidim/_head/add_awesome_tags.html.erb.deface +4 -11
  61. data/app/overrides/layouts/decidim/admin/_header/{replace_scripts.html.erb.deface → add_awesome_tags.html.erb.deface} +4 -4
  62. data/app/packs/entrypoints/decidim_admin_decidim_awesome.js +1 -2
  63. data/app/packs/entrypoints/decidim_admin_decidim_awesome_global.js +4 -0
  64. data/app/packs/entrypoints/decidim_admin_decidim_awesome_global.scss +1 -0
  65. data/app/packs/entrypoints/decidim_decidim_awesome.js +2 -2
  66. data/app/packs/entrypoints/decidim_editor.js +14 -0
  67. data/app/packs/src/decidim/decidim_awesome/admin/auto_edit.js +95 -70
  68. data/app/packs/src/decidim/decidim_awesome/admin/check_redirections.js +46 -41
  69. data/app/packs/src/decidim/decidim_awesome/admin/codemirror.js +3 -3
  70. data/app/packs/src/decidim/decidim_awesome/admin/constraint_form_events.js +115 -0
  71. data/app/packs/src/decidim/decidim_awesome/admin/custom_fields_builder.js +4 -1
  72. data/app/packs/src/decidim/decidim_awesome/admin/form_exit_warn.js +22 -11
  73. data/app/packs/src/decidim/decidim_awesome/admin/proposal_sortings.js +26 -8
  74. data/app/packs/src/decidim/decidim_awesome/admin/user_picker.js +34 -21
  75. data/app/packs/src/decidim/decidim_awesome/amendments/show_modal_on_limits.js +20 -22
  76. data/app/packs/src/decidim/decidim_awesome/awesome_admin.js +5 -16
  77. data/app/packs/src/decidim/decidim_awesome/awesome_admin_global.js +1 -0
  78. data/app/packs/src/decidim/decidim_awesome/awesome_application.js +0 -15
  79. data/app/packs/src/decidim/decidim_awesome/awesome_map/api/fetcher.js +33 -11
  80. data/app/packs/src/decidim/decidim_awesome/awesome_map/api/meetings_fetcher.js +9 -12
  81. data/app/packs/src/decidim/decidim_awesome/awesome_map/api/proposals_fetcher.js +28 -0
  82. data/app/packs/src/decidim/decidim_awesome/awesome_map/awesome_map.js +3 -4
  83. data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/controller.js +12 -12
  84. data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/meetings_controller.js +11 -7
  85. data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/proposals_controller.js +6 -13
  86. data/app/packs/src/decidim/decidim_awesome/awesome_map/controls_ui.js +51 -20
  87. data/app/packs/src/decidim/decidim_awesome/awesome_map/load_map.js +27 -18
  88. data/app/packs/src/decidim/decidim_awesome/editor/index.js +94 -0
  89. data/app/packs/src/decidim/decidim_awesome/forms/autosave.js +28 -23
  90. data/app/packs/src/decidim/decidim_awesome/forms/custom_fields_renderer.js +9 -14
  91. data/app/packs/src/decidim/decidim_awesome/forms/rich_text_plugin.js +27 -32
  92. data/app/packs/src/decidim/decidim_awesome/proposals/images.js +16 -10
  93. data/app/packs/src/decidim/decidim_awesome/voting/voting_cards.js +47 -38
  94. data/app/packs/stylesheets/decidim/decidim_awesome/admin/auto_edits.scss +11 -12
  95. data/app/packs/stylesheets/decidim/decidim_awesome/admin/check_redirections.scss +15 -0
  96. data/app/packs/stylesheets/decidim/decidim_awesome/admin/codemirror.scss +19 -12
  97. data/app/packs/stylesheets/decidim/decidim_awesome/admin/constraints.scss +8 -32
  98. data/app/packs/stylesheets/decidim/decidim_awesome/admin/custom_fields.scss +28 -78
  99. data/app/packs/stylesheets/decidim/decidim_awesome/admin/custom_styles.scss +48 -0
  100. data/app/packs/stylesheets/decidim/decidim_awesome/admin/intergram_fixes.scss +11 -0
  101. data/app/packs/stylesheets/decidim/decidim_awesome/admin/user_picker.scss +15 -24
  102. data/app/packs/stylesheets/decidim/decidim_awesome/amendments/modal.scss +5 -0
  103. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_admin.scss +9 -47
  104. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_admin_global.scss +3 -12
  105. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_application.scss +3 -19
  106. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_iframe/iframe.scss +1 -1
  107. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_map/map.scss +27 -21
  108. data/app/packs/stylesheets/decidim/decidim_awesome/forms/autosave.scss +6 -6
  109. data/app/packs/stylesheets/decidim/decidim_awesome/forms/custom_fields.scss +32 -101
  110. data/app/packs/stylesheets/decidim/decidim_awesome/shared/spinner.scss +5 -26
  111. data/app/packs/stylesheets/decidim/decidim_awesome/voting/voting_cards.scss +34 -52
  112. data/app/permissions/decidim/decidim_awesome/permissions.rb +3 -4
  113. data/app/presenters/concerns/decidim/decidim_awesome/breadcrumb_root_menu_item_presenter_override.rb +23 -0
  114. data/app/presenters/concerns/decidim/decidim_awesome/menu_item_presenter_override.rb +10 -2
  115. data/app/presenters/concerns/decidim/decidim_awesome/menu_presenter_override.rb +8 -0
  116. data/app/presenters/decidim/decidim_awesome/participatory_space_role_presenter.rb +1 -1
  117. data/app/presenters/decidim/decidim_awesome/private_data_presenter.rb +11 -11
  118. data/app/presenters/decidim/decidim_awesome/user_entity_presenter.rb +1 -1
  119. data/app/queries/decidim/decidim_awesome/private_data_finder.rb +1 -1
  120. data/app/serializers/decidim/decidim_awesome/proposals/private_proposal_serializer.rb +0 -8
  121. data/app/views/decidim/decidim_awesome/admin/admin_accountability/index.html.erb +23 -17
  122. data/app/views/decidim/decidim_awesome/admin/checks/index.html.erb +1 -3
  123. data/app/views/decidim/decidim_awesome/admin/config/_autoedit_box_label.html.erb +3 -3
  124. data/app/views/decidim/decidim_awesome/admin/config/_constraints.html.erb +20 -21
  125. data/app/views/decidim/decidim_awesome/admin/config/_form_admins.html.erb +6 -5
  126. data/app/views/decidim/decidim_awesome/admin/config/_form_editors.html.erb +2 -2
  127. data/app/views/decidim/decidim_awesome/admin/config/_form_livechat.html.erb +39 -23
  128. data/app/views/decidim/decidim_awesome/admin/config/_form_proposal_custom_fields.html.erb +4 -6
  129. data/app/views/decidim/decidim_awesome/admin/config/_form_proposals.html.erb +64 -76
  130. data/app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb +15 -11
  131. data/app/views/decidim/decidim_awesome/admin/config/_form_surveys.html.erb +8 -6
  132. data/app/views/decidim/decidim_awesome/admin/config/show.html.erb +22 -12
  133. data/app/views/decidim/decidim_awesome/admin/constraints/_form.html.erb +1 -49
  134. data/app/views/decidim/decidim_awesome/admin/constraints/new.html.erb +14 -9
  135. data/app/views/decidim/decidim_awesome/admin/constraints/show.html.erb +14 -9
  136. data/app/views/decidim/decidim_awesome/admin/custom_redirects/_form.html.erb +20 -5
  137. data/app/views/decidim/decidim_awesome/admin/custom_redirects/edit.html.erb +5 -5
  138. data/app/views/decidim/decidim_awesome/admin/custom_redirects/index.html.erb +15 -15
  139. data/app/views/decidim/decidim_awesome/admin/custom_redirects/new.html.erb +5 -5
  140. data/app/views/decidim/decidim_awesome/admin/maintenance/_private_data.html.erb +4 -4
  141. data/app/views/decidim/decidim_awesome/admin/menu_hacks/_form.html.erb +6 -6
  142. data/app/views/decidim/decidim_awesome/admin/menu_hacks/edit.html.erb +21 -12
  143. data/app/views/decidim/decidim_awesome/admin/menu_hacks/index.html.erb +16 -18
  144. data/app/views/decidim/decidim_awesome/admin/menu_hacks/new.html.erb +21 -12
  145. data/app/views/decidim/decidim_awesome/admin/shared/_filters_with_date.html.erb +14 -18
  146. data/app/views/decidim/decidim_awesome/amendments/_modal.html.erb +18 -11
  147. data/app/views/decidim/decidim_awesome/custom_fields/_form_render.html.erb +3 -5
  148. data/app/views/decidim/decidim_awesome/iframe_component/iframe/show.html.erb +7 -12
  149. data/app/views/decidim/decidim_awesome/map_component/map/_map_template.html.erb +53 -37
  150. data/app/views/decidim/decidim_awesome/map_component/map/show.html.erb +14 -5
  151. data/app/views/decidim/decidim_awesome/voting/voting_cards/_show_vote_button.html.erb +0 -3
  152. data/app/views/layouts/decidim/decidim_awesome/_awesome_config.html.erb +9 -7
  153. data/app/views/layouts/decidim/decidim_awesome/_intergram_widget.html.erb +9 -6
  154. data/app/views/layouts/decidim/decidim_awesome/admin/_base.html.erb +3 -12
  155. data/config/assets.rb +3 -33
  156. data/config/i18n-tasks.yml +1 -0
  157. data/config/locales/ca.yml +17 -94
  158. data/config/locales/cs.yml +15 -93
  159. data/config/locales/de.yml +15 -91
  160. data/config/locales/en.yml +24 -28
  161. data/config/locales/es.yml +18 -96
  162. data/config/locales/eu.yml +8 -18
  163. data/config/locales/fr.yml +15 -94
  164. data/config/locales/hu.yml +4 -18
  165. data/config/locales/it.yml +9 -26
  166. data/config/locales/ja.yml +16 -93
  167. data/config/locales/lt.yml +2 -4
  168. data/config/locales/nl.yml +8 -18
  169. data/config/locales/pt-BR.yml +11 -25
  170. data/config/locales/ro-RO.yml +2 -14
  171. data/config/locales/sv.yml +10 -21
  172. data/config/rubocop/disabled.yml +11 -0
  173. data/config/rubocop/faker.yml +480 -0
  174. data/config/rubocop/rails.yml +88 -0
  175. data/config/rubocop/rspec.yml +65 -0
  176. data/config/rubocop/ruby.yml +1210 -0
  177. data/db/migrate/20240306175331_rename_editor_images_awesome_config.rb +18 -0
  178. data/db/migrate/20240729164227_add_decidim_awesome_proposal_private_fields_date.rb +1 -1
  179. data/db/seeds.rb +3 -3
  180. data/lib/decidim/decidim_awesome/admin_engine.rb +4 -1
  181. data/lib/decidim/decidim_awesome/api/types/translated_custom_fields_type.rb +2 -3
  182. data/lib/decidim/decidim_awesome/awesome.rb +42 -28
  183. data/lib/decidim/decidim_awesome/awesome_helpers.rb +1 -1
  184. data/lib/decidim/decidim_awesome/checksums.yml +39 -60
  185. data/lib/decidim/decidim_awesome/config.rb +1 -1
  186. data/lib/decidim/decidim_awesome/custom_fields.rb +5 -5
  187. data/lib/decidim/decidim_awesome/engine.rb +24 -6
  188. data/lib/decidim/decidim_awesome/iframe_component/component.rb +1 -2
  189. data/lib/decidim/decidim_awesome/lock.rb +2 -2
  190. data/lib/decidim/decidim_awesome/map_component/component.rb +1 -1
  191. data/lib/decidim/decidim_awesome/menu.rb +33 -14
  192. data/lib/decidim/decidim_awesome/menu_hacker.rb +4 -8
  193. data/lib/decidim/decidim_awesome/system_checker.rb +2 -4
  194. data/lib/decidim/decidim_awesome/test/factories.rb +10 -10
  195. data/lib/decidim/decidim_awesome/test/initializer.rb +3 -11
  196. data/lib/decidim/decidim_awesome/test/layouts/decidim/_head.html.erb +2 -2
  197. data/lib/decidim/decidim_awesome/test/layouts/decidim/admin/_header.html.erb +2 -2
  198. data/lib/decidim/decidim_awesome/test/shared_examples/box_label_editor_examples.rb +18 -18
  199. data/lib/decidim/decidim_awesome/test/shared_examples/config_examples.rb +3 -3
  200. data/lib/decidim/decidim_awesome/test/shared_examples/custom_fields_examples.rb +11 -11
  201. data/lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb +7 -7
  202. data/lib/decidim/decidim_awesome/test/shared_examples/editor_examples.rb +26 -66
  203. data/lib/decidim/decidim_awesome/test/shared_examples/menu_hack_contexts.rb +10 -9
  204. data/lib/decidim/decidim_awesome/test/shared_examples/scoped_admins_examples.rb +30 -20
  205. data/lib/decidim/decidim_awesome/test/shared_examples/summary_examples.rb +19 -10
  206. data/lib/decidim/decidim_awesome/version.rb +2 -2
  207. data/lib/decidim/decidim_awesome/voting_manifest.rb +5 -10
  208. data/lib/decidim/decidim_awesome.rb +1 -2
  209. data/lib/tasks/decidim_awesome_active_storage_migrations_tasks.rake +1 -1
  210. data/lib/tasks/decidim_awesome_upgrade_tasks.rake +4 -0
  211. data/package.json +19 -28
  212. metadata +40 -56
  213. data/app/cells/concerns/decidim/decidim_awesome/proposal_m_cell_override.rb +0 -18
  214. data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter/show.erb +0 -15
  215. data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter/vote_button.erb +0 -15
  216. data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter_cell.rb +0 -21
  217. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_modal/show.erb +0 -16
  218. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_modal_cell.rb +0 -20
  219. data/app/cells/decidim/proposals/proposal_m/footer.erb +0 -13
  220. data/app/overrides/layouts/decidim/_head/add_awesome_legacy_scripts.rb +0 -14
  221. data/app/overrides/layouts/decidim/admin/_header/replace_styles.html.erb.deface +0 -3
  222. data/app/packs/entrypoints/decidim_admin_decidim_awesome_custom_fields.js +0 -2
  223. data/app/packs/entrypoints/decidim_decidim_awesome_admin_form_exit_warn.js +0 -1
  224. data/app/packs/src/decidim/decidim_awesome/admin/constraints.js +0 -55
  225. data/app/packs/src/decidim/decidim_awesome/editors/editor.js +0 -213
  226. data/app/packs/stylesheets/decidim/decidim_awesome/editors/markdown_editor.scss +0 -19
  227. data/app/packs/stylesheets/decidim/decidim_awesome/editors/quill_editor.scss +0 -58
  228. data/app/packs/stylesheets/vendor/select2-foundation-theme.scss +0 -348
  229. data/app/serializers/concerns/decidim/decidim_awesome/proposal_serializer_override.rb +0 -65
  230. data/app/views/decidim/decidim_awesome/admin/config/_modal.html.erb +0 -11
  231. data/app/views/decidim/decidim_awesome/voting/voting_cards/_proposal_m_cell_footer.erb +0 -15
  232. /data/app/packs/src/decidim/decidim_awesome/{editors/tabs_focus.js → admin/tabs_change.js} +0 -0
@@ -1,26 +1,32 @@
1
1
  <div class="card">
2
- <div class="card-divider">
3
- <h2 class="card-title"><%= t(".title") %>
4
- <span class="exports dropdown tiny button button--simple button--title" data-toggle="export-dropdown">
5
- <%= t "exports.button", scope: "decidim.decidim_awesome.admin.admin_accountability" %>
6
- </span>
7
- <div class="dropdown-pane" id="export-dropdown" data-dropdown data-auto-focus="true" data-close-on-click="true">
8
- <ul class="vertical menu add-components">
9
- <% %w{CSV JSON Excel}.each do |format| %>
10
- <li class="exports--format--<%= format.downcase %> exports--registrations">
11
- <%= link_to t("decidim.decidim_awesome.admin.admin_accountability.exports.export_as", export_format:
12
- format.upcase), export_admin_accountability_path(export_params.merge(format: format)), method: :post %>
13
- </li>
14
- <% end %>
15
- </ul>
2
+ <div class="bg-gray-6 p-4 rounded-t">
3
+ <h2 class="card-title flex md:flex-row justify-between sm:flex-wrap">
4
+ <%= t(".title") %>
5
+ <div class="flex gap-4">
6
+ <%= link_to t(global? ? ".see_spaces" : ".see_global"), admin_accountability_path(admins: !global?), class: "button button__sm button__transparent-secondary tiny button--title new" %>
7
+ <span class="exports button button__sm button__secondary tiny button--simple button--title" data-toggle="export-dropdown">
8
+ <%= t "exports.button", scope: "decidim.decidim_awesome.admin.admin_accountability" %>
9
+ <%= icon "arrow-down-s-fill" %>
10
+ </span>
11
+ <div class="dropdown-pane" id="export-dropdown" data-dropdown data-auto-focus="true" data-close-on-click="true">
12
+ <ul class="vertical menu add-components">
13
+ <% %w{CSV JSON Excel}.each do |format| %>
14
+ <li class="exports--format--<%= format.downcase %> exports--registrations">
15
+ <%= link_to t("decidim.decidim_awesome.admin.admin_accountability.exports.export_as", export_format:
16
+ format.upcase), export_admin_accountability_path(export_params.merge(format: format)),
17
+ method: :post,
18
+ class: "focus-visible:outline-none" %>
19
+ </li>
20
+ <% end %>
21
+ </ul>
22
+ </div>
16
23
  </div>
17
- <%= link_to t(global? ? ".see_spaces" : ".see_global"), admin_accountability_path(admins: !global?), class: "button tiny button--title new" %>
18
- </h2>
24
+ </h2>
19
25
  </div>
20
26
 
21
27
  <%= render partial: "decidim/decidim_awesome/admin/shared/filters_with_date", locals: { i18n_ctx: "admin_accountability" } %>
22
28
 
23
- <div class="card-section">
29
+ <div class="card-section p-4">
24
30
  <p class="help-text"><%= t(global? ? ".global_description" : ".description") %></p>
25
31
 
26
32
  <% if global_users_missing_date %>
@@ -2,9 +2,7 @@
2
2
  Force tailwind to compile these classes
3
3
  class="fill-success fill-alert"
4
4
  -->
5
- <div class="card-divider">
6
- <h2 class="card-title"><%= t ".title" %></h2>
7
- </div>
5
+
8
6
  <div class="card-section decidim-version">
9
7
  <p>
10
8
  <span class="label <%= decidim_version_valid? ? "success" : "alert" %>"><%= t ".decidim_version", version: decidim_version %></span>
@@ -3,10 +3,10 @@
3
3
  scope: "activemodel.attributes",
4
4
  id: "<span class='awesome-auto-edit' data-var='#{var}' data-scope='#{scope}' data-key='#{key}'>#{key}</span>").html_safe %>
5
5
 
6
- <%= icon_link_to "pencil", "#", t("edit_label", scope: "decidim.decidim_awesome.admin.config.form"), class: "awesome-auto-edit", data: { "scope" => "#{scope}" } %>
6
+ <%= icon_link_to "pencil-line", "#", t("edit_label", scope: "decidim.decidim_awesome.admin.config.form"), class: "awesome-auto-edit", data: { "scope" => "#{scope}" } %>
7
7
 
8
- <%= link_to delete_path, method: :delete, class: "float-right delete-box", title: t("remove", scope: "decidim.decidim_awesome.admin.config.form_#{var}"), data: { confirm: t("sure_to_remove", scope: "decidim.decidim_awesome.admin.config.form_#{var}") } do %>
9
- <%= icon "circle-x" %>
8
+ <%= link_to delete_path, method: :delete, class: "awesome-auto-delete", title: t("remove", scope: "decidim.decidim_awesome.admin.config.form_#{var}"), data: { confirm: t("sure_to_remove", scope: "decidim.decidim_awesome.admin.config.form_#{var}") } do %>
9
+ <%= icon "delete-bin-line" %>
10
10
  <%= t("delete", scope: "decidim.decidim_awesome.admin.config.form_#{var}") %>
11
11
  <% end %>
12
12
  <% end %>
@@ -1,35 +1,34 @@
1
- <div class="constraints-editor" data-key="<%= key %>">
2
- <div class="callout" style="display:none" data-closable>
3
- <p></p>
4
- <button class="close-button" aria-label="Dismiss alert" type="button" data-close>
5
- <span aria-hidden="true">&times;</span>
6
- </button>
7
- </div>
1
+ <div class="constraints-editor mb-8 mt-4" data-key="<%= key %>">
2
+ <%= cell "decidim/announcement", "<p></p>".html_safe, hidden: true %>
8
3
  <h5 class="mb-2"><%= t ".title" %></h5>
9
4
  <% if constraints.blank? %>
10
5
  <span class="label warning"><%= t ".always" %></span>
11
6
  <% end %>
12
7
 
13
- <ul class="constraints-list<%= " inactive" if constraints.detect { |c| c.settings["participatory_space_manifest"] == "none" } %> <%= "no-items" if constraints.blank? || constraints.all? { |c| c.settings.none? { |k, val| val.present? } } %>">
8
+ <ul class="constraints-list<%= " inactive" if constraints&.detect{|c| c.settings["participatory_space_manifest"]=="none" } %>">
14
9
  <% constraints&.each do |constraint| %>
15
- <% if constraint.settings.any? { |k, val| val.present? } %>
16
- <li>
17
- <% constraint.settings.reverse_each do |k, val| %>
18
- <% if val.present? %>
19
- <span class="label <%= k %> constraint-<%= val %>"><%= translate_constraint_value constraint, k %></span>
20
- <% end %>
21
- <% end %>
22
- <button id="<%= "edit-#{key}-#{constraint.id}" %>" type="button" name="button" class="edit-condition" data-dialog-open="<%= "edit-modal-#{key}" %>" data-constraints-url="<%= constraint_path(id: constraint.id, key: key) %>">
10
+ <li>
11
+ <% constraint.settings.reverse_each do |k, val| %>
12
+ <span class="label <%= k %> constraint-<%= val %>"><%= translate_constraint_value constraint, k %></span>
13
+ <% end %>
14
+
15
+ <div class="inline-flex items-center gap-1 ml-10">
16
+ <button id="<%= "edit-#{key}-#{constraint.id}" %>" type="button" name="button" class="edit-condition button button__xs button__transparent-secondary" data-dialog-open="<%= "edit-modal-#{key}" %>" data-constraints-url="<%= constraint_path(id: constraint.id, key: key) %>">
23
17
  <%= t ".edit" %>
24
18
  </button>
25
19
 
26
- <%= link_to t(".delete"), constraint_path(id: constraint.id), remote: true, method: :delete, class: "delete-condition" %>
27
- </li>
28
- <% end %>
20
+ <%= link_to t(".delete"), constraint_path(id: constraint.id), remote: true, method: :delete, class: "button button__xs button__transparent-primary" %>
21
+ </div>
22
+ </li>
29
23
  <% end %>
30
24
  </ul>
31
- <button id="<%= "new-#{key}" %>" type="button" name="button" class="add-condition button small button__secondary" data-open="constraintsModal" data-constraints-url="<%= new_constraint_path(key: key) %>">
32
- <%= icon "plus", class: "small" %>
25
+
26
+ <button id="<%= "new-#{key}" %>" type="button" name="button" class="add-condition button button__xs button__secondary" data-dialog-open="<%= "new-modal-#{key}" %>" data-constraints-url="<%= new_constraint_path(key: key) %>">
27
+ <%= icon "add-box-line" %>
33
28
  <%= t ".add_condition" %>
34
29
  </button>
30
+
35
31
  </div>
32
+
33
+ <%= decidim_modal id: "edit-modal-#{key}", data: { constraint: key }, remote: true %>
34
+ <%= decidim_modal id: "new-modal-#{key}", data: { constraint: key }, remote: true %>
@@ -1,4 +1,4 @@
1
- <div class="row column decidim_awesome-form">
1
+ <div class="form__wrapper row column decidim_awesome-form">
2
2
  <% if config_enabled? :scoped_admins %>
3
3
  <p class="help-text"><%= t("help.scoped_admins", scope: "decidim.decidim_awesome.admin.config.form") %></p>
4
4
 
@@ -7,15 +7,16 @@
7
7
  <%= render(partial: "decidim/decidim_awesome/admin/config/autoedit_box_label", locals: { var: "scoped_admins", key: key, scope: "scoped_admin_#{key}", delete_path: decidim_admin_decidim_awesome.scoped_admin_path(key: key) }) %>
8
8
  <p class="form-error is-visible" id="scoped-admin-error-<%= $key %>"><%= errors[key.to_sym].join("<br>") if errors %></p>
9
9
 
10
- <%= select_tag "config[scoped_admins][#{key}]", options_from_collection_for_select(users_for(value), :id, :text, proc { true }), { include_blank: false , class: "multiusers-select", multiple: true, data: { url: decidim_admin_decidim_awesome.users_path } } %>
10
+ <%= select_tag "config[scoped_admins][#{key}]", options_for_select(users_for(value), value), { include_blank: false , class: "multiusers-select", multiple: true, data: { url: decidim_admin_decidim_awesome.users_path } } %>
11
11
 
12
12
  <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: "scoped_admin_#{key}", constraints: constraints_for("scoped_admin_#{key}") }) %>
13
13
  </div>
14
14
  <% end %>
15
15
 
16
- <%= link_to t("new", scope: "decidim.decidim_awesome.admin.config.form_scoped_admins"), decidim_admin_decidim_awesome.scoped_admins_path, method: :post %>
16
+ <%= link_to decidim_admin_decidim_awesome.scoped_admins_path, method: :post, class: "button button__sm button__text-secondary mr-auto" do %>
17
+ <%= icon("add-box-line") %>
18
+ <%= t("new", scope: "decidim.decidim_awesome.admin.config.form_scoped_admins") %>
19
+ <% end %>
17
20
 
18
21
  <% end %>
19
22
  </div>
20
-
21
- <%= javascript_pack_tag "decidim_decidim_awesome_admin_form_exit_warn" %>
@@ -4,8 +4,8 @@
4
4
  <%= t("help.original_editor_override", scope: "decidim.decidim_awesome.admin.config.form") %></p>
5
5
  </div>
6
6
 
7
- <% enabled_configs([:allow_images_in_full_editor, :allow_images_in_small_editor, :allow_videos_in_editors]).each do |key| %>
8
- <div class="row column">
7
+ <% enabled_configs([:allow_images_in_editors, :allow_videos_in_editors]).each do |key| %>
8
+ <div class="row column card p-4">
9
9
  <%= form.check_box key, help_text: t("help.#{key}", scope: "decidim.decidim_awesome.admin.config.form") %>
10
10
 
11
11
  <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: key, constraints: constraints_for(key) }) %>
@@ -1,44 +1,60 @@
1
- <div class="row column decidim_awesome-form">
1
+ <div class="form__wrapper decidim_awesome-form">
2
2
  <% if config_enabled? :intergram_for_public %>
3
+ <div class="row column">
3
4
  <%= form.check_box :intergram_for_public %>
4
- <p class="help-text"><%= t("help.intergram_about", scope: "decidim.decidim_awesome.admin.config.form").html_safe %></p>
5
+ <span class="help-text mb-4" style="margin-top:-1rem;">
6
+ <%= t("help.intergram_about", scope: "decidim.decidim_awesome.admin.config.form").html_safe %>
7
+ </span>
5
8
 
6
9
  <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: :intergram_for_public, constraints: constraints_for(:intergram_for_public) }) %>
7
10
 
8
11
  <%= fields_for "config[intergram_for_public_settings]", form.object.intergram_for_public_settings do |f| %>
9
- <%= f.text_field :chat_id, label: t("intergram_chat_id", scope: "activemodel.attributes.config") %>
10
- <p class="help-text"><%= t("help.intergram_config", scope: "decidim.decidim_awesome.admin.config.form").html_safe %></p>
12
+ <div class="mb-4">
13
+ <%= f.text_field :chat_id, label: t("intergram_chat_id", scope: "activemodel.attributes.config") %>
14
+ <p class="help-text" style="margin-top: -1rem;">
15
+ <%= t("help.intergram_config", scope: "decidim.decidim_awesome.admin.config.form").html_safe %>
16
+ </p>
17
+ </div>
18
+
11
19
  <%= f.check_box :require_login, label: t("intergram_require_login", scope: "activemodel.attributes.config") %>
12
- <%= f.check_box :use_floating_button, label: t("intergram_use_floating_button", scope: "activemodel.attributes.config") %>
13
- <%= f.color_field :color, label: t("intergram_color", scope: "activemodel.attributes.config") %>
20
+ <%= f.check_box :use_floating_button, class: "mb-4", label: t("intergram_use_floating_button", scope: "activemodel.attributes.config"), label_options: { class: "block" } %>
21
+ <%= f.color_field :color, class: "mb-4 block w-full p-1", label: t("intergram_color", scope: "activemodel.attributes.config") %>
14
22
 
15
- <%= f.text_field :title_open, label: t("intergram_title_open", scope: "activemodel.attributes.config"), placeholder: t("decidim.decidim_awesome.config.intergram.title_open") %>
16
- <%= f.text_field :title_closed, label: t("intergram_title_closed", scope: "activemodel.attributes.config"), placeholder: t("decidim.decidim_awesome.config.intergram.title_closed") %>
17
- <%= f.text_field :intro_message, label: t("intergram_intro_message", scope: "activemodel.attributes.config"), placeholder: t("decidim.decidim_awesome.config.intergram.intro_message") %>
18
- <%= f.text_field :auto_no_response, label: t("intergram_auto_no_response", scope: "activemodel.attributes.config"), placeholder: t("decidim.decidim_awesome.config.intergram.auto_no_response") %>
23
+ <%= f.text_field :title_open, class: "mb-4", label: t("intergram_title_open", scope: "activemodel.attributes.config"), placeholder: t("decidim.decidim_awesome.config.intergram.title_open") %>
24
+ <%= f.text_field :title_closed, class: "mb-4", label: t("intergram_title_closed", scope: "activemodel.attributes.config"), placeholder: t("decidim.decidim_awesome.config.intergram.title_closed") %>
25
+ <%= f.text_field :intro_message, class: "mb-4", label: t("intergram_intro_message", scope: "activemodel.attributes.config"), placeholder: t("decidim.decidim_awesome.config.intergram.intro_message") %>
26
+ <%= f.text_field :auto_no_response, class: "mb-4", label: t("intergram_auto_no_response", scope: "activemodel.attributes.config"), placeholder: t("decidim.decidim_awesome.config.intergram.auto_no_response") %>
19
27
  <% end %>
28
+ </div>
20
29
  <% end %>
21
30
  </div>
22
31
 
23
- <div class="row column decidim_awesome-form">
32
+ <div class="form__wrapper decidim_awesome-form">
24
33
  <% if config_enabled? :intergram_for_admins %>
34
+ <div class="row column">
25
35
  <%= form.check_box :intergram_for_admins %>
26
- <p class="help-text"><%= t("help.intergram_about", scope: "decidim.decidim_awesome.admin.config.form").html_safe %></p>
36
+ <span class="help-text mb-4" style="margin-top:-1rem;">
37
+ <%= t("help.intergram_about", scope: "decidim.decidim_awesome.admin.config.form").html_safe %>
38
+ </span>
27
39
 
28
40
  <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: :intergram_for_admins, constraints: constraints_for(:intergram_for_admins) }) %>
29
41
 
30
42
  <%= fields_for "config[intergram_for_admins_settings]", form.object.intergram_for_admins_settings do |f| %>
31
- <%= f.text_field :chat_id, label: t("intergram_chat_id", scope: "activemodel.attributes.config") %>
32
- <p class="help-text"><%= t("help.intergram_config", scope: "decidim.decidim_awesome.admin.config.form").html_safe %></p>
33
-
34
- <%= f.check_box :use_floating_button, label: t("intergram_use_floating_button", scope: "activemodel.attributes.config") %>
35
- <%= f.color_field :color, label: t("intergram_color", scope: "activemodel.attributes.config") %>
36
-
37
- <%= f.text_field :title_open, label: t("intergram_title_open", scope: "activemodel.attributes.config"), placeholder: t("decidim.decidim_awesome.config.intergram.title_open") %>
38
- <%= f.text_field :title_closed, label: t("intergram_title_closed", scope: "activemodel.attributes.config"), placeholder: t("decidim.decidim_awesome.config.intergram.title_closed") %>
39
- <%= f.text_field :intro_message, label: t("intergram_intro_message", scope: "activemodel.attributes.config"), placeholder: t("decidim.decidim_awesome.config.intergram.intro_message") %>
40
- <%= f.text_field :auto_no_response, label: t("intergram_auto_no_response", scope: "activemodel.attributes.config"), placeholder: t("decidim.decidim_awesome.config.intergram.auto_no_response") %>
43
+ <div class="mb-4">
44
+ <%= f.text_field :chat_id, label: t("intergram_chat_id", scope: "activemodel.attributes.config") %>
45
+ <p class="help-text" style="margin-top: -1rem;">
46
+ <%= t("help.intergram_config", scope: "decidim.decidim_awesome.admin.config.form").html_safe %>
47
+ </p>
48
+ </div>
49
+
50
+ <%= f.check_box :use_floating_button, class: "mb-4", label: t("intergram_use_floating_button", scope: "activemodel.attributes.config") %>
51
+ <%= f.color_field :color, class: "mb-4 block w-full p-1", label: t("intergram_color", scope: "activemodel.attributes.config") %>
52
+
53
+ <%= f.text_field :title_open, class: "mb-4", label: t("intergram_title_open", scope: "activemodel.attributes.config"), placeholder: t("decidim.decidim_awesome.config.intergram.title_open") %>
54
+ <%= f.text_field :title_closed, class: "mb-4", label: t("intergram_title_closed", scope: "activemodel.attributes.config"), placeholder: t("decidim.decidim_awesome.config.intergram.title_closed") %>
55
+ <%= f.text_field :intro_message, class: "mb-4", label: t("intergram_intro_message", scope: "activemodel.attributes.config"), placeholder: t("decidim.decidim_awesome.config.intergram.intro_message") %>
56
+ <%= f.text_field :auto_no_response, class: "mb-4", label: t("intergram_auto_no_response", scope: "activemodel.attributes.config"), placeholder: t("decidim.decidim_awesome.config.intergram.auto_no_response") %>
41
57
  <% end %>
42
-
58
+ </div>
43
59
  <% end %>
44
60
  </div>
@@ -21,13 +21,13 @@
21
21
  </div>
22
22
  <% end %>
23
23
  <% form.object.send(config_var)&.each do |key, value| %>
24
- <div class="card proposal_custom_fields_container<%= " private" if priv %> js-box-container" data-key="<%= key %>" data-var="<%= config_var %>">
24
+ <div class="card p-4 proposal_custom_fields_container<%= " private" if priv %> js-box-container" data-key="<%= key %>" data-var="<%= config_var %>">
25
25
  <%= render("decidim/decidim_awesome/admin/config/autoedit_box_label", var: config_var, key: key, scope: "#{field}_#{key}", delete_path: decidim_admin_decidim_awesome.proposal_custom_field_path(key: key, private: priv)) %>
26
26
  <p class="form-error is-visible"><%= errors[key.to_sym].join("<br>") if errors %></p>
27
27
 
28
28
  <%= hidden_field_tag key, value, name: "config[#{config_var}][#{key}]" %>
29
29
 
30
- <div class="proposal_custom_fields_editor <%= " private" if priv %>">
30
+ <div class="proposal_custom_fields_editor mt-4<%= " private" if priv %>">
31
31
  <div class="loading-spinner"></div>
32
32
  </div>
33
33
 
@@ -35,11 +35,9 @@
35
35
  </div>
36
36
  <% end %>
37
37
 
38
- <%= link_to decidim_admin_decidim_awesome.proposal_custom_fields_path(private: priv), method: :post, class: "add-field button small hollow mr-auto" do %>
39
- <%= icon "plus", class: "small" %>
38
+ <%= link_to decidim_admin_decidim_awesome.proposal_custom_fields_path(private: priv), method: :post, class: "button button__sm button__text-secondary mr-auto" do %>
39
+ <%= icon("add-box-line") %>
40
40
  <%= t("new", scope: "decidim.decidim_awesome.admin.config.form_#{config_var}") %>
41
41
  <% end %>
42
42
  <% end %>
43
43
  </div>
44
-
45
- <%= javascript_pack_tag "decidim_decidim_awesome_admin_form_exit_warn" %>
@@ -1,108 +1,96 @@
1
- <div class="row column decidim_awesome-form">
2
- <% if config_enabled? :allow_images_in_proposals %>
3
- <p class="text-info"><%= t("rich_text_editor_in_public_views", scope: "decidim.decidim_awesome.admin.config") if current_organization.rich_text_editor_in_public_views %></p>
4
-
5
- <%= form.check_box :allow_images_in_proposals, disabled: current_organization.rich_text_editor_in_public_views %>
6
- <p class="help-text"><%= t("help.allow_images_in_proposals", scope: "decidim.decidim_awesome.admin.config.form") %></p>
7
-
8
- <% unless current_organization.rich_text_editor_in_public_views %>
1
+ <div class="form__wrapper decidim_awesome-form gap-0">
2
+ <% if config_enabled?(:allow_images_in_proposals) && !current_organization.rich_text_editor_in_public_views %>
3
+ <div class="row column">
4
+ <%= form.check_box :allow_images_in_proposals, help_text: t("help.allow_images_in_proposals", scope: "decidim.decidim_awesome.admin.config.form") %>
9
5
  <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: :allow_images_in_proposals, constraints: constraints_for(:allow_images_in_proposals) }) %>
10
- <% end %>
6
+ </div>
11
7
  <% end %>
12
- </div>
13
-
14
- <% if config_enabled? :additional_proposal_sortings %>
15
- </div> <!-- .card-section -->
16
- </div><!-- .card -->
17
8
 
18
- <div class="card">
19
- <div class="card-divider">
9
+ <% if config_enabled?(:additional_proposal_sortings) %>
10
+ <div class="row column">
20
11
  <h2 class="card-title"><%= t("additional_proposal_sortings.title", scope: "decidim.decidim_awesome.admin.config.form") %></h2>
21
12
  </div>
22
- <div class="card-section">
23
- <div class="row column decidim_awesome-form">
24
- <%= form.select :additional_proposal_sortings, @form.additional_proposal_sorting_labels, { include_blank: false }, { multiple: true } %>
25
- <p class="help-text">
26
- <%= t("additional_proposal_sortings.help", scope: "decidim.decidim_awesome.admin.config.form") %> <%= link_to t("additional_proposal_sortings.enable_all", scope: "decidim.decidim_awesome.admin.config.form"), "#", id: "additional_proposal_sortings-enable-all" %>.
27
- </p>
28
-
29
- <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: :additional_proposal_sortings, constraints: constraints_for(:additional_proposal_sortings) }) %>
30
- </div>
31
- <% end %>
13
+ <div class="row column">
14
+ <%= form.select :additional_proposal_sortings, @form.additional_proposal_sorting_labels, { include_blank: false }, { multiple: true } %>
15
+
16
+ <p class="help-text"><%= t("additional_proposal_sortings.help", scope: "decidim.decidim_awesome.admin.config.form") %> <%= link_to t("additional_proposal_sortings.enable_all", scope: "decidim.decidim_awesome.admin.config.form"), "#", id: "additional_proposal_sortings-enable-all" %>.</p>
32
17
 
33
- <% if config_enabled?(:validate_title_min_length, :validate_title_max_caps_percent, :validate_title_max_marks_together, :validate_title_start_with_caps) %>
34
- </div> <!-- .card-section -->
35
- </div><!-- .card -->
18
+ <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: :additional_proposal_sortings, constraints: constraints_for(:additional_proposal_sortings) }) %>
19
+ </div>
20
+ <% end %>
36
21
 
37
- <div class="card">
38
- <div class="card-divider">
22
+ <% if config_enabled?(:validate_title_min_length, :validate_title_max_caps_percent, :validate_title_max_marks_together, :validate_title_start_with_caps) %>
23
+ <div class="row column">
39
24
  <h2 class="card-title"><%= t("validators.title", scope: "decidim.decidim_awesome.admin.config.form") %></h2>
40
25
  </div>
41
- <div class="card-section">
42
- <div class="row column decidim_awesome-form">
43
- <% if config_enabled? :validate_title_start_with_caps %>
44
- <%= form.check_box :validate_title_start_with_caps %>
26
+ <% if config_enabled? :validate_title_start_with_caps %>
27
+ <div class="row column">
28
+ <%= form.check_box :validate_title_start_with_caps %>
45
29
 
46
- <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: :validate_title_start_with_caps, constraints: constraints_for(:validate_title_start_with_caps) }) %>
47
- <% end %>
30
+ <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: :validate_title_start_with_caps, constraints: constraints_for(:validate_title_start_with_caps) }) %>
31
+ </div>
32
+ <% end %>
48
33
 
49
- <% if config_enabled? :validate_title_min_length %>
50
- <%= form.number_field :validate_title_min_length %>
51
- <p class="help-text"><%= t("help.validate_title_min_length", scope: "decidim.decidim_awesome.admin.config.form") %></p>
34
+ <% if config_enabled?(:validate_title_min_length) %>
35
+ <div class="row column">
36
+ <%= form.number_field :validate_title_min_length, help_text: t("help.validate_title_min_length", scope: "decidim.decidim_awesome.admin.config.form") %>
52
37
 
53
- <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: :validate_title_min_length, constraints: constraints_for(:validate_title_min_length) }) %>
54
- <% end %>
38
+ <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: :validate_title_min_length, constraints: constraints_for(:validate_title_min_length) }) %>
39
+ </div>
40
+ <% end %>
55
41
 
56
- <% if config_enabled? :validate_title_max_caps_percent %>
57
- <%= form.number_field :validate_title_max_caps_percent %>
58
- <p class="help-text"><%= t("help.validate_title_max_caps_percent", scope: "decidim.decidim_awesome.admin.config.form") %></p>
42
+ <% if config_enabled?(:validate_title_max_caps_percent) %>
43
+ <div class="row column">
44
+ <%= form.number_field :validate_title_max_caps_percent, help_text: t("help.validate_title_max_caps_percent", scope: "decidim.decidim_awesome.admin.config.form") %>
59
45
 
60
- <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: :validate_title_max_caps_percent, constraints: constraints_for(:validate_title_max_caps_percent) }) %>
61
- <% end %>
46
+ <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: :validate_title_max_caps_percent, constraints: constraints_for(:validate_title_max_caps_percent) }) %>
47
+ </div>
48
+ <% end %>
62
49
 
63
- <% if config_enabled? :validate_title_max_marks_together %>
64
- <%= form.number_field :validate_title_max_marks_together %>
65
- <p class="help-text"><%= t("help.validate_title_max_marks_together", scope: "decidim.decidim_awesome.admin.config.form") %></p>
50
+ <% if config_enabled?(:validate_title_max_marks_together) %>
51
+ <div class="row column">
52
+ <%= form.number_field :validate_title_max_marks_together, help_text: t("help.validate_title_max_marks_together", scope: "decidim.decidim_awesome.admin.config.form") %>
66
53
 
67
- <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: :validate_title_max_marks_together, constraints: constraints_for(:validate_title_max_marks_together) }) %>
68
- <% end %>
54
+ <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: :validate_title_max_marks_together, constraints: constraints_for(:validate_title_max_marks_together) }) %>
69
55
  </div>
70
- <% end %>
71
-
72
- <% if config_enabled?(:validate_body_min_length, :validate_body_max_caps_percent, :validate_body_max_marks_together, :validate_body_start_with_caps) %>
73
- </div> <!-- .card-section -->
74
- </div><!-- .card -->
56
+ <% end %>
57
+ <% end %>
75
58
 
76
- <div class="card">
77
- <div class="card-divider">
59
+ <% if config_enabled?(:validate_body_min_length, :validate_body_max_caps_percent, :validate_body_max_marks_together, :validate_body_start_with_caps) %>
60
+ <div class="row column">
78
61
  <h2 class="card-title"><%= t("validators.body", scope: "decidim.decidim_awesome.admin.config.form") %></h2>
79
62
  </div>
80
- <div class="card-section">
81
- <% if config_enabled? :validate_body_start_with_caps %>
63
+
64
+ <% if config_enabled?(:validate_body_start_with_caps) %>
65
+ <div class="row column">
82
66
  <%= form.check_box :validate_body_start_with_caps %>
83
67
 
84
68
  <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: :validate_body_start_with_caps, constraints: constraints_for(:validate_body_start_with_caps) }) %>
85
- <% end %>
69
+ </div>
70
+ <% end %>
86
71
 
87
- <% if config_enabled? :validate_body_min_length %>
88
- <%= form.number_field :validate_body_min_length %>
89
- <p class="help-text"><%= t("help.validate_body_min_length", scope: "decidim.decidim_awesome.admin.config.form") %></p>
72
+ <% if config_enabled?(:validate_body_min_length) %>
73
+ <div class="row column">
74
+ <%= form.number_field :validate_body_min_length, help_text: t("help.validate_body_min_length", scope: "decidim.decidim_awesome.admin.config.form") %>
90
75
 
91
76
  <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: :validate_body_min_length, constraints: constraints_for(:validate_body_min_length) }) %>
92
- <% end %>
77
+ </div>
78
+ <% end %>
93
79
 
94
- <% if config_enabled? :validate_body_max_caps_percent %>
95
- <%= form.number_field :validate_body_max_caps_percent %>
96
- <p class="help-text"><%= t("help.validate_body_max_caps_percent", scope: "decidim.decidim_awesome.admin.config.form") %></p>
80
+ <% if config_enabled?(:validate_body_max_caps_percent) %>
81
+ <div class="row column">
82
+ <%= form.number_field :validate_body_max_caps_percent, help_text: t("help.validate_body_max_caps_percent", scope: "decidim.decidim_awesome.admin.config.form") %>
97
83
 
98
84
  <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: :validate_body_max_caps_percent, constraints: constraints_for(:validate_body_max_caps_percent) }) %>
99
- <% end %>
85
+ </div>
86
+ <% end %>
100
87
 
101
- <% if config_enabled? :validate_body_max_marks_together %>
102
- <%= form.number_field :validate_body_max_marks_together %>
103
- <p class="help-text"><%= t("help.validate_body_max_marks_together", scope: "decidim.decidim_awesome.admin.config.form") %></p>
88
+ <% if config_enabled?(:validate_body_max_marks_together) %>
89
+ <div class="row column">
90
+ <%= form.number_field :validate_body_max_marks_together, help_text: t("help.validate_body_max_marks_together", scope: "decidim.decidim_awesome.admin.config.form") %>
104
91
 
105
92
  <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: :validate_body_max_marks_together, constraints: constraints_for(:validate_body_max_marks_together) }) %>
106
- <% end %>
107
- </div>
108
- <% end %>
93
+ </div>
94
+ <% end %>
95
+ <% end %>
96
+ </div>
@@ -1,13 +1,16 @@
1
- <div class="row column decidim_awesome-form">
1
+ <div class="form__wrapper row column decidim_awesome-form">
2
2
  <% if config_enabled? :scoped_styles %>
3
- <p class="help-text"><%= t("help.scoped_styles", scope: "decidim.decidim_awesome.admin.config.form") %>
4
- <%= t("help.scoped_styles_variables", scope: "decidim.decidim_awesome.admin.config.form") %>
5
- </p>
6
- <p class="help-text" style="white-space: unset">
7
- <% ["primary", "secondary", "success", "warning", "alert", "highlight", "highlight_alternative"].each do |color| %>
8
- <span class="color-box <%= color %>" style="background-color: <%= current_organization.colors[color] %>"></span> var(--<%= color %>)
3
+ <div class="colors-help">
4
+ <p><%= t("help.scoped_styles", scope: "decidim.decidim_awesome.admin.config.form") %>
5
+ <%= t("help.scoped_styles_variables", scope: "decidim.decidim_awesome.admin.config.form") %>
6
+ </p>
7
+ <p class="colors">
8
+ <% ["primary", "secondary", "tertiary", "success", "warning", "alert"].each do |color| %>
9
+ <span class="color-box <%= color %>" style="background-color: <%= current_organization.colors[color] %>"></span>
10
+ <code>var(--<%= color %>)</code>
9
11
  <% end %>
10
- </p>
12
+ </p>
13
+ </div>
11
14
 
12
15
  <% form.object.scoped_styles&.each do |key, value| %>
13
16
  <div class="scoped_styles_container p-4 js-box-container" data-key="<%= key %>">
@@ -18,9 +21,10 @@
18
21
  </div>
19
22
  <% end %>
20
23
 
21
- <%= link_to t("new", scope: "decidim.decidim_awesome.admin.config.form_scoped_styles"), decidim_admin_decidim_awesome.scoped_styles_path, method: :post %>
24
+ <%= link_to decidim_admin_decidim_awesome.scoped_styles_path, method: :post, class: "button button__sm button__text-secondary mr-auto" do %>
25
+ <%= icon("add-box-line") %>
26
+ <%= t("new", scope: "decidim.decidim_awesome.admin.config.form_scoped_styles") %>
27
+ <% end %>
22
28
 
23
29
  <% end %>
24
30
  </div>
25
-
26
- <%= javascript_pack_tag "decidim_decidim_awesome_admin_form_exit_warn" %>
@@ -1,9 +1,11 @@
1
- <div class="row column decidim_awesome-form">
1
+ <div class="form__wrapper decidim_awesome-form">
2
2
  <% if config_enabled? :auto_save_forms %>
3
-
4
- <%= form.check_box :auto_save_forms %>
5
- <p class="help-text"><%= t("help.auto_save_forms", scope: "decidim.decidim_awesome.admin.config.form") %></p>
6
-
7
- <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: :auto_save_forms, constraints: constraints_for(:auto_save_forms) }) %>
3
+ <div class="row column">
4
+ <%= form.check_box :auto_save_forms %>
5
+ <span class="help-text mb-4" style="margin-top: -1rem;">
6
+ <%= t("help.auto_save_forms", scope: "decidim.decidim_awesome.admin.config.form") %>
7
+ </span>
8
+ <%= render(partial: "decidim/decidim_awesome/admin/config/constraints", locals: { key: :auto_save_forms, constraints: constraints_for(:auto_save_forms) }) %>
9
+ </div>
8
10
  <% end %>
9
11
  </div>
@@ -1,14 +1,24 @@
1
- <%= decidim_form_for(@form, method: :patch, url: decidim_admin_decidim_awesome.config_path(config_var), html: { class: "awesome-edit-config" }, data: { "safe-path" => decidim_admin_decidim_awesome.config_path(config_var) }) do |f| %>
2
- <div class="card">
3
- <div class="card-divider">
4
- <%= t(".title", setting: t(config_var, scope: "decidim.decidim_awesome.admin.config.title")) %>
1
+ <div class="item_show__header">
2
+ <h2 class="item_show__header-title">
3
+ <%= t(".title", setting: t(config_var, scope: "decidim.decidim_awesome.admin.config.title")) %>
4
+ </h2>
5
+ </div>
6
+ <div class="card">
7
+ <div class="card-section">
8
+ <div class="item__edit item__edit-1col">
9
+ <div class="item__edit-form">
10
+ <%= decidim_form_for(@form, method: :patch, url: decidim_admin_decidim_awesome.config_path(config_var), html: { class: "form-defaults awesome-edit-config" }, data: { "safe-path" => decidim_admin_decidim_awesome.config_path(config_var) }) do |f| %>
11
+ <div class="card-section">
12
+ <%= render "form_#{config_var}", form: f, errors: defined?(errors) ? errors : nil %>
13
+ </div>
14
+
15
+ <div class="item__edit-sticky">
16
+ <div class="item__edit-sticky-container">
17
+ <%= f.submit t(".update"), class: "button button__sm button__secondary" %>
18
+ </div>
19
+ </div>
20
+ <% end %>
21
+ </div>
5
22
  </div>
6
- <div class="card-section">
7
- <%= render partial: "form_#{config_var}", locals: { form: f, errors: defined?(errors) ? errors : nil } %>
8
- </div>
9
- </div>
10
- <div class="button--double form-general-submit">
11
- <%= f.submit t(".update") %>
12
23
  </div>
13
- <% end %>
14
- <%= render partial: "modal" %>
24
+ </div>