Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix dynamic fields elements for IE11 (#5052)
####🎩 What? Why? This fixes the dynamic field elements for IE11 as explained in #5035. This is an unfortunately complex fix for IE11 but it is the only way to make it compatible with that browser. The biggest issue with this is not actually the admin panel where we initially noticed issues with this but another component we built for the participation interface using the same component. Therefore, this component should consider both cases to support IE11 as well. This should also maintain backwards compatibility in case someone is using the `<template>` tags with the dynamic fields component. ####📌 Related Issues - Fixes #5035 ####📋 Subtasks - [x] Add `CHANGELOG` entry - [X] Fix tests
- Loading branch information
Showing
with
92 additions
and 38 deletions.
- +6 −0 .erb-lint.yml
- +1 −0 CHANGELOG.md
- +44 −3 decidim-admin/app/assets/javascripts/decidim/admin/dynamic_fields.component.js.es6
- +7 −0 decidim-forms/app/views/decidim/forms/admin/questionnaires/_answer_option_template.html.erb
- +9 −7 decidim-forms/app/views/decidim/forms/admin/questionnaires/_form.html.erb
- +1 −7 decidim-forms/app/views/decidim/forms/admin/questionnaires/_question.html.erb
- +5 −5 decidim-forms/lib/decidim/forms/test/shared_examples/manage_questionnaires.rb
- +1 −7 decidim-meetings/app/views/decidim/meetings/admin/agenda/_agenda_item.html.erb
- +7 −0 decidim-meetings/app/views/decidim/meetings/admin/agenda/_agenda_item_child_template.html.erb
- +9 −7 decidim-meetings/app/views/decidim/meetings/admin/agenda/_form.html.erb
- +2 −2 decidim-meetings/app/views/decidim/meetings/admin/meetings/_services.html.erb
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -10,6 +10,12 @@ linters: | ||
SpaceAroundErbTag: | ||
enabled: true | ||
|
||
AllowedScriptType: | ||
enabled: true | ||
allowed_types: | ||
- text/javascript | ||
- text/template | ||
|
||
Rubocop: | ||
enabled: true | ||
|
||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,7 @@ | ||
<% question = form.object %> | ||
|
||
<script type="text/template" class="decidim-template" id="<%= template_id %>"> | ||
<%= fields_for "questionnaire[questions][#{question.to_param}][answer_options][]", blank_answer_option do |answer_option_form| %> | ||
<%= render "decidim/forms/admin/questionnaires/answer_option", form: answer_option_form, question: question, editable: editable %> | ||
<% end %> | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,7 @@ | ||
<% agenda_item = form.object %> | ||
|
||
<script type="text/template" class="decidim-template" id="<%= template_id %>"> | ||
<%= fields_for "meeting_agenda[agenda_items][#{agenda_item.to_param}][agenda_item_children][#{blank_agenda_item.to_param_child}]", blank_agenda_item do |agenda_item_child_form| %> | ||
<%= render "agenda_item_child", form: agenda_item_child_form, tabs_id: tabs_id_for_agenda_item(blank_agenda_item), tabs_id_child: tabs_id_for_agenda_item_child(blank_agenda_item), editable: editable %> | ||
<% end %> | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters