decidim-forms 0.29.2 → 0.30.0.rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/forms/step_navigation_cell.rb +18 -5
  3. data/app/commands/decidim/forms/admin/update_questionnaire.rb +1 -82
  4. data/app/commands/decidim/forms/admin/update_questions.rb +109 -0
  5. data/app/commands/decidim/forms/answer_questionnaire.rb +10 -3
  6. data/app/controllers/decidim/forms/admin/concerns/has_questionnaire.rb +39 -3
  7. data/app/controllers/decidim/forms/admin/concerns/has_questionnaire_answers.rb +2 -2
  8. data/app/controllers/decidim/forms/concerns/has_questionnaire.rb +12 -4
  9. data/app/forms/decidim/forms/admin/display_condition_form.rb +1 -1
  10. data/app/forms/decidim/forms/admin/questionnaire_form.rb +0 -9
  11. data/app/forms/decidim/forms/admin/questions_form.rb +18 -0
  12. data/app/forms/decidim/forms/answer_choice_form.rb +5 -0
  13. data/app/forms/decidim/forms/answer_form.rb +1 -0
  14. data/app/forms/decidim/forms/questionnaire_form.rb +7 -0
  15. data/app/helpers/decidim/forms/admin/concerns/has_questionnaire_answers_pagination_helper.rb +1 -1
  16. data/app/helpers/decidim/forms/admin/concerns/has_questionnaire_answers_url_helper.rb +5 -5
  17. data/app/jobs/decidim/forms/export_questionnaire_answers_job.rb +5 -1
  18. data/app/models/decidim/forms/answer_choice.rb +0 -2
  19. data/app/models/decidim/forms/answer_option.rb +1 -1
  20. data/app/models/decidim/forms/question.rb +10 -0
  21. data/app/packs/entrypoints/decidim_forms.js +0 -1
  22. data/app/packs/entrypoints/decidim_forms_admin.js +6 -0
  23. data/app/packs/src/decidim/forms/admin/publish_answers_buttons.js +72 -0
  24. data/app/packs/src/decidim/forms/forms.js +22 -18
  25. data/app/presenters/decidim/forms/admin/questionnaire_participant_presenter.rb +1 -1
  26. data/app/presenters/decidim/forms/admin_log/question_presenter.rb +31 -0
  27. data/app/queries/decidim/forms/questionnaire_user_answers.rb +1 -1
  28. data/app/views/decidim/forms/admin/questionnaires/_answer_option_template.html.erb +1 -1
  29. data/app/views/decidim/forms/admin/questionnaires/_display_condition_template.html.erb +1 -1
  30. data/app/views/decidim/forms/admin/questionnaires/_form.html.erb +0 -89
  31. data/app/views/decidim/forms/admin/questionnaires/_matrix_row_template.html.erb +1 -1
  32. data/app/views/decidim/forms/admin/questionnaires/_question.html.erb +3 -3
  33. data/app/views/decidim/forms/admin/questionnaires/_questions_form.html.erb +80 -0
  34. data/app/views/decidim/forms/admin/questionnaires/edit.html.erb +0 -20
  35. data/app/views/decidim/forms/admin/questionnaires/edit_questions.html.erb +47 -0
  36. data/app/views/decidim/forms/questionnaires/_questionnaire.html.erb +8 -1
  37. data/app/views/decidim/forms/questionnaires/answers/_files.html.erb +1 -1
  38. data/app/views/decidim/forms/questionnaires/answers/_sorting.html.erb +12 -6
  39. data/app/views/decidim/forms/questionnaires/edit.html.erb +47 -0
  40. data/app/views/decidim/forms/questionnaires/show.html.erb +13 -2
  41. data/config/assets.rb +1 -2
  42. data/config/locales/bg.yml +0 -2
  43. data/config/locales/ca.yml +46 -6
  44. data/config/locales/cs.yml +45 -5
  45. data/config/locales/de.yml +45 -5
  46. data/config/locales/el.yml +0 -2
  47. data/config/locales/en.yml +45 -5
  48. data/config/locales/es-MX.yml +45 -5
  49. data/config/locales/es-PY.yml +45 -5
  50. data/config/locales/es.yml +45 -5
  51. data/config/locales/eu.yml +45 -5
  52. data/config/locales/fi-plain.yml +45 -5
  53. data/config/locales/fi.yml +45 -5
  54. data/config/locales/fr-CA.yml +37 -5
  55. data/config/locales/fr.yml +37 -5
  56. data/config/locales/ja.yml +46 -1
  57. data/config/locales/lt.yml +0 -2
  58. data/config/locales/pl.yml +0 -2
  59. data/config/locales/ro-RO.yml +22 -17
  60. data/config/locales/zh-TW.yml +0 -2
  61. data/db/migrate/20190315203056_add_session_token_to_decidim_forms_answers.rb +1 -1
  62. data/db/migrate/20241122142230_add_survey_answers_published_at_to_questions.rb +7 -0
  63. data/decidim-forms.gemspec +1 -2
  64. data/lib/decidim/api/answer_option_type.rb +1 -1
  65. data/lib/decidim/api/question_type.rb +4 -4
  66. data/lib/decidim/api/questionnaire_type.rb +4 -4
  67. data/lib/decidim/exporters/form_pdf.rb +114 -11
  68. data/lib/decidim/forms/download_your_data_user_answers_serializer.rb +0 -4
  69. data/lib/decidim/forms/test/factories.rb +2 -2
  70. data/lib/decidim/forms/test/shared_examples/has_questionnaire.rb +44 -4
  71. data/lib/decidim/forms/test/shared_examples/manage_questionnaire_answers.rb +17 -17
  72. data/lib/decidim/forms/test/shared_examples/manage_questionnaires/add_display_conditions.rb +19 -21
  73. data/lib/decidim/forms/test/shared_examples/manage_questionnaires/add_questions.rb +70 -94
  74. data/lib/decidim/forms/test/shared_examples/manage_questionnaires/update_display_conditions.rb +15 -18
  75. data/lib/decidim/forms/test/shared_examples/manage_questionnaires/update_questions.rb +90 -125
  76. data/lib/decidim/forms/test/shared_examples/manage_questionnaires.rb +4 -25
  77. data/lib/decidim/forms/version.rb +1 -1
  78. data/lib/decidim/forms.rb +0 -1
  79. metadata +18 -32
  80. data/app/packs/entrypoints/decidim_questionnaire_answers_pdf.js +0 -1
  81. data/app/packs/entrypoints/decidim_questionnaire_answers_pdf.scss +0 -1
  82. data/app/packs/stylesheets/decidim/forms/questionnaire-answers-pdf.scss +0 -69
  83. data/app/views/decidim/forms/admin/questionnaires/answers/export/_answer.html.erb +0 -31
  84. data/app/views/decidim/forms/admin/questionnaires/answers/export/pdf.html.erb +0 -13
  85. data/app/views/layouts/decidim/forms/admin/questionnaires/questionnaire_answers.html.erb +0 -12
  86. data/config/initializers/wicked_pdf.rb +0 -26
  87. data/lib/decidim/exporters/form_pdf_controller_helper.rb +0 -13
@@ -7,68 +7,61 @@ shared_examples_for "update questions" do
7
7
  let!(:question) { create(:questionnaire_question, questionnaire:, body:) }
8
8
 
9
9
  before do
10
- visit questionnaire_edit_path
11
- expand_all_questions
10
+ click_on "Save"
11
+ visit_manage_questions_and_expand_all
12
12
  end
13
13
 
14
14
  it "modifies the question when the information is valid" do
15
- within "form.edit_questionnaire" do
16
- within ".questionnaire-question" do
17
- fill_in "questionnaire_questions_#{question.id}_body_en", with: "Modified question"
18
- fill_in "questionnaire_questions_#{question.id}_max_characters", with: 30
19
- check "Mandatory"
20
- select "Long answer", from: "Type"
21
- end
22
-
23
- click_on "Save"
15
+ within ".questionnaire-question" do
16
+ fill_in "questions_questions_#{question.id}_body_en", with: "Modified question"
17
+ fill_in "questions_questions_#{question.id}_max_characters", with: 30
18
+ check "Mandatory"
19
+ select "Long answer", from: "Type"
24
20
  end
25
21
 
22
+ click_on "Save"
23
+
26
24
  expect(page).to have_admin_callout("successfully")
27
25
 
28
- visit_questionnaire_edit_path_and_expand_all
26
+ visit_manage_questions_and_expand_all
29
27
 
30
28
  expect(page).to have_css("input[value='Modified question']")
31
29
  expect(page).to have_no_css("input[value='This is the first question']")
32
- expect(page).to have_css("input#questionnaire_questions_#{question.id}_mandatory[checked]")
33
- expect(page).to have_css("input#questionnaire_questions_#{question.id}_max_characters[value='30']")
34
- expect(page).to have_css("select#questionnaire_questions_#{question.id}_question_type option[value='long_answer'][selected]")
30
+ expect(page).to have_css("input#questions_questions_#{question.id}_mandatory[checked]")
31
+ expect(page).to have_css("input#questions_questions_#{question.id}_max_characters[value='30']")
32
+ expect(page).to have_css("select#questions_questions_#{question.id}_question_type option[value='long_answer'][selected]")
35
33
  end
36
34
 
37
35
  it "re-renders the form when the information is invalid and displays errors" do
38
36
  expand_all_questions
39
37
 
40
- within "form.edit_questionnaire" do
41
- within ".questionnaire-question" do
42
- expect(page).to have_content("Statement*")
43
- fill_in "questionnaire_questions_#{question.id}_body_en", with: ""
44
- fill_in "questionnaire_questions_#{question.id}_max_characters", with: -3
45
- check "Mandatory"
46
- select "Matrix (Multiple option)", from: "Type"
47
- select "2", from: "Maximum number of choices"
48
- end
49
-
50
- click_on "Save"
38
+ within ".questionnaire-question" do
39
+ expect(page).to have_content("Statement*")
40
+ fill_in "questions_questions_#{question.id}_body_en", with: ""
41
+ fill_in "questions_questions_#{question.id}_max_characters", with: -3
42
+ check "Mandatory"
43
+ select "Matrix (Multiple option)", from: "Type"
44
+ select "2", from: "Maximum number of choices"
51
45
  end
52
46
 
53
- expand_all_questions
47
+ click_on "Save"
48
+ click_on "Expand all questions"
54
49
 
55
50
  expect(page).to have_admin_callout("There was a problem saving")
56
- expect(page).to have_content("cannot be blank", count: 5) # empty question, 2 empty default answer options, 2 empty default matrix rows
51
+ expect(page).to have_content("cannot be blank", count: 5)
57
52
  expect(page).to have_content("must be greater than or equal to 0", count: 1)
58
53
 
59
54
  expect(page).to have_css("input[value='']")
60
55
  expect(page).to have_no_css("input[value='This is the first question']")
61
- expect(page).to have_css("input#questionnaire_questions_#{question.id}_mandatory[checked]")
62
- expect(page).to have_css("input#questionnaire_questions_#{question.id}_max_characters[value='-3']")
56
+ expect(page).to have_css("input#questions_questions_#{question.id}_mandatory[checked]")
57
+ expect(page).to have_css("input#questions_questions_#{question.id}_max_characters[value='-3']")
58
+ expect(page).to have_css("select#questions_questions_#{question.id}_question_type option[value='matrix_multiple'][selected]")
63
59
  expect(page).to have_select("Maximum number of choices", selected: "2")
64
- expect(page).to have_css("select#questionnaire_questions_#{question.id}_question_type option[value='matrix_multiple'][selected]")
65
60
  end
66
61
 
67
62
  it "preserves deleted status across submission failures" do
68
- within "form.edit_questionnaire" do
69
- within ".questionnaire-question" do
70
- click_on "Remove"
71
- end
63
+ within ".questionnaire-question" do
64
+ click_on "Remove"
72
65
  end
73
66
 
74
67
  click_on "Add question"
@@ -84,36 +77,28 @@ shared_examples_for "update questions" do
84
77
  end
85
78
 
86
79
  it "removes the question" do
87
- within "form.edit_questionnaire" do
88
- within ".questionnaire-question" do
89
- click_on "Remove"
90
- end
91
-
92
- click_on "Save"
80
+ within ".questionnaire-question" do
81
+ click_on "Remove"
93
82
  end
94
83
 
84
+ click_on "Save"
85
+
95
86
  expect(page).to have_admin_callout("successfully")
96
87
 
97
- visit questionnaire_edit_path
88
+ click_on "Manage questions"
98
89
 
99
- within "form.edit_questionnaire" do
100
- expect(page).to have_css(".questionnaire-question", count: 0)
101
- end
90
+ expect(page).to have_css(".questionnaire-question", count: 0)
102
91
  end
103
92
 
104
93
  it "cannot be moved up" do
105
- within "form.edit_questionnaire" do
106
- within ".questionnaire-question" do
107
- expect(page).to have_no_button("Up")
108
- end
94
+ within ".questionnaire-question" do
95
+ expect(page).to have_no_button("Up")
109
96
  end
110
97
  end
111
98
 
112
99
  it "cannot be moved down" do
113
- within "form.edit_questionnaire" do
114
- within ".questionnaire-question" do
115
- expect(page).to have_no_button("Down")
116
- end
100
+ within ".questionnaire-question" do
101
+ expect(page).to have_no_button("Down")
117
102
  end
118
103
  end
119
104
  end
@@ -122,22 +107,20 @@ shared_examples_for "update questions" do
122
107
  let!(:question) { create(:questionnaire_question, :title_and_description, questionnaire:, body: title_and_description_body) }
123
108
 
124
109
  before do
125
- visit questionnaire_edit_path
126
- expand_all_questions
110
+ click_on "Save"
111
+ visit_manage_questions_and_expand_all
127
112
  end
128
113
 
129
114
  it "modifies the question when the information is valid" do
130
- within "form.edit_questionnaire" do
131
- within ".questionnaire-question" do
132
- fill_in "questionnaire_questions_#{question.id}_body_en", with: "Modified title and description"
133
- end
134
-
135
- click_on "Save"
115
+ within ".questionnaire-question" do
116
+ fill_in "questions_questions_#{question.id}_body_en", with: "Modified title and description"
136
117
  end
137
118
 
119
+ click_on "Save"
120
+
138
121
  expect(page).to have_admin_callout("successfully")
139
122
 
140
- visit_questionnaire_edit_path_and_expand_all
123
+ visit_manage_questions_and_expand_all
141
124
 
142
125
  expect(page).to have_css("input[value='Modified title and description']")
143
126
  expect(page).to have_no_css("input[value='This is the first title and description']")
@@ -146,14 +129,12 @@ shared_examples_for "update questions" do
146
129
  it "re-renders the form when the information is invalid and displays errors" do
147
130
  expand_all_questions
148
131
 
149
- within "form.edit_questionnaire" do
150
- within ".questionnaire-question" do
151
- fill_in "questionnaire_questions_#{question.id}_body_en", with: ""
152
- end
153
-
154
- click_on "Save"
132
+ within ".questionnaire-question" do
133
+ fill_in "questions_questions_#{question.id}_body_en", with: ""
155
134
  end
156
135
 
136
+ click_on "Save"
137
+
157
138
  expand_all_questions
158
139
 
159
140
  expect(page).to have_admin_callout("There was a problem saving")
@@ -163,10 +144,8 @@ shared_examples_for "update questions" do
163
144
  end
164
145
 
165
146
  it "preserves deleted status across submission failures" do
166
- within "form.edit_questionnaire" do
167
- within ".questionnaire-question" do
168
- click_on "Remove"
169
- end
147
+ within ".questionnaire-question" do
148
+ click_on "Remove"
170
149
  end
171
150
 
172
151
  click_on "Add question"
@@ -182,36 +161,28 @@ shared_examples_for "update questions" do
182
161
  end
183
162
 
184
163
  it "removes the question" do
185
- within "form.edit_questionnaire" do
186
- within ".questionnaire-question" do
187
- click_on "Remove"
188
- end
189
-
190
- click_on "Save"
164
+ within ".questionnaire-question" do
165
+ click_on "Remove"
191
166
  end
192
167
 
168
+ click_on "Save"
169
+
193
170
  expect(page).to have_admin_callout("successfully")
194
171
 
195
- visit questionnaire_edit_path
172
+ click_on "Manage questions"
196
173
 
197
- within "form.edit_questionnaire" do
198
- expect(page).to have_css(".questionnaire-question", count: 0)
199
- end
174
+ expect(page).to have_css(".questionnaire-question", count: 0)
200
175
  end
201
176
 
202
177
  it "cannot be moved up" do
203
- within "form.edit_questionnaire" do
204
- within ".questionnaire-question" do
205
- expect(page).to have_no_button("Up")
206
- end
178
+ within ".questionnaire-question" do
179
+ expect(page).to have_no_button("Up")
207
180
  end
208
181
  end
209
182
 
210
183
  it "cannot be moved down" do
211
- within "form.edit_questionnaire" do
212
- within ".questionnaire-question" do
213
- expect(page).to have_no_button("Down")
214
- end
184
+ within ".questionnaire-question" do
185
+ expect(page).to have_no_button("Down")
215
186
  end
216
187
  end
217
188
  end
@@ -233,7 +204,8 @@ shared_examples_for "update questions" do
233
204
  end
234
205
 
235
206
  before do
236
- visit questionnaire_edit_path
207
+ click_on "Save"
208
+ click_on "Manage questions"
237
209
  end
238
210
 
239
211
  it "allows deleting answer options" do
@@ -245,35 +217,31 @@ shared_examples_for "update questions" do
245
217
 
246
218
  click_on "Save"
247
219
 
248
- visit_questionnaire_edit_path_and_expand_all
220
+ visit_manage_questions_and_expand_all
249
221
 
250
222
  expect(page).to have_css(".questionnaire-question-answer-option", count: 2)
251
223
  end
252
224
 
253
225
  it "still removes the question even if previous editions rendered the options invalid" do
254
- within "form.edit_questionnaire" do
255
- expect(page).to have_css(".questionnaire-question", count: 1)
256
-
257
- expand_all_questions
226
+ expect(page).to have_css(".questionnaire-question", count: 1)
258
227
 
259
- within ".questionnaire-question-answer-option:first-of-type" do
260
- fill_in find_nested_form_field_locator("body_en"), with: ""
261
- end
228
+ expand_all_questions
262
229
 
263
- within ".questionnaire-question" do
264
- click_on "Remove", match: :first
265
- end
230
+ within ".questionnaire-question-answer-option:first-of-type" do
231
+ fill_in find_nested_form_field_locator("body_en"), with: ""
232
+ end
266
233
 
267
- click_on "Save"
234
+ within ".questionnaire-question" do
235
+ click_on "Remove", match: :first
268
236
  end
269
237
 
238
+ click_on "Save"
239
+
270
240
  expect(page).to have_admin_callout("successfully")
271
241
 
272
- visit_questionnaire_edit_path_and_expand_all
242
+ visit_manage_questions_and_expand_all
273
243
 
274
- within "form.edit_questionnaire" do
275
- expect(page).to have_css(".questionnaire-question", count: 0)
276
- end
244
+ expect(page).to have_css(".questionnaire-question", count: 0)
277
245
  end
278
246
  end
279
247
 
@@ -300,7 +268,8 @@ shared_examples_for "update questions" do
300
268
  end
301
269
 
302
270
  before do
303
- visit_questionnaire_edit_path_and_expand_all
271
+ click_on "Save"
272
+ visit_manage_questions_and_expand_all
304
273
  end
305
274
 
306
275
  it "allows deleting matrix rows" do
@@ -310,7 +279,7 @@ shared_examples_for "update questions" do
310
279
 
311
280
  click_on "Save"
312
281
 
313
- visit_questionnaire_edit_path_and_expand_all
282
+ visit_manage_questions_and_expand_all
314
283
 
315
284
  within ".questionnaire-question:last-of-type" do
316
285
  expect(page).to have_css(".questionnaire-question-matrix-row", count: 2)
@@ -319,27 +288,23 @@ shared_examples_for "update questions" do
319
288
  end
320
289
 
321
290
  it "still removes the question even if previous editions rendered the rows invalid" do
322
- within "form.edit_questionnaire" do
323
- expect(page).to have_css(".questionnaire-question", count: 2)
324
-
325
- within ".questionnaire-question-matrix-row:first-of-type" do
326
- fill_in find_nested_form_field_locator("body_en"), with: ""
327
- end
291
+ expect(page).to have_css(".questionnaire-question", count: 2)
328
292
 
329
- within ".questionnaire-question:last-of-type" do
330
- click_on "Remove", match: :first
331
- end
293
+ within ".questionnaire-question-matrix-row:first-of-type" do
294
+ fill_in find_nested_form_field_locator("body_en"), with: ""
295
+ end
332
296
 
333
- click_on "Save"
297
+ within ".questionnaire-question:last-of-type" do
298
+ click_on "Remove", match: :first
334
299
  end
335
300
 
301
+ click_on "Save"
302
+
336
303
  expect(page).to have_admin_callout("successfully")
337
304
 
338
- visit_questionnaire_edit_path_and_expand_all
305
+ visit_manage_questions_and_expand_all
339
306
 
340
- within "form.edit_questionnaire" do
341
- expect(page).to have_css(".questionnaire-question", count: 1)
342
- end
307
+ expect(page).to have_css(".questionnaire-question", count: 1)
343
308
  end
344
309
  end
345
310
 
@@ -361,8 +326,8 @@ shared_examples_for "update questions" do
361
326
  end
362
327
 
363
328
  before do
364
- visit questionnaire_edit_path
365
- expand_all_questions
329
+ click_on "Save"
330
+ visit_manage_questions_and_expand_all
366
331
  end
367
332
 
368
333
  shared_examples_for "switching questions order" do
@@ -24,30 +24,9 @@ shared_examples_for "manage questionnaires" do
24
24
  }
25
25
  end
26
26
 
27
- it "updates the questionnaire" do
28
- visit questionnaire_edit_path
29
-
30
- new_description = {
31
- en: "<p>New description</p>",
32
- ca: "<p>Nova descripció</p>",
33
- es: "<p>Nueva descripción</p>"
34
- }
35
-
36
- within "form.edit_questionnaire" do
37
- fill_in_i18n_editor(:questionnaire_description, "#questionnaire-description-tabs", new_description)
38
- click_on "Save"
39
- end
40
-
41
- expect(page).to have_admin_callout("successfully")
42
-
43
- visit questionnaire_public_path
44
-
45
- expect(page).to have_content("New description")
46
- end
47
-
48
27
  context "when the questionnaire is not already answered" do
49
28
  before do
50
- visit questionnaire_edit_path
29
+ visit manage_questions_path
51
30
  end
52
31
 
53
32
  it_behaves_like "add questions"
@@ -61,7 +40,7 @@ shared_examples_for "manage questionnaires" do
61
40
  let!(:answer) { create(:answer, questionnaire:, question:) }
62
41
 
63
42
  it "cannot modify questionnaire questions" do
64
- visit questionnaire_edit_path
43
+ visit manage_questions_path
65
44
 
66
45
  expect(page).to have_no_content("Add question")
67
46
  expect(page).to have_no_content("Remove")
@@ -112,8 +91,8 @@ shared_examples_for "manage questionnaires" do
112
91
  find(".button.expand-all").click
113
92
  end
114
93
 
115
- def visit_questionnaire_edit_path_and_expand_all
116
- visit questionnaire_edit_path
94
+ def visit_manage_questions_and_expand_all
95
+ click_on "Manage questions"
117
96
  expand_all_questions
118
97
  end
119
98
  end
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-forms version.
5
5
  module Forms
6
6
  def self.version
7
- "0.29.2"
7
+ "0.30.0.rc2"
8
8
  end
9
9
  end
10
10
  end
data/lib/decidim/forms.rb CHANGED
@@ -14,6 +14,5 @@ module Decidim
14
14
 
15
15
  module Exporters
16
16
  autoload :FormPDF, "decidim/exporters/form_pdf"
17
- autoload :FormPDFControllerHelper, "decidim/exporters/form_pdf_controller_helper"
18
17
  end
19
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.29.2
4
+ version: 0.30.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2025-02-12 00:00:00.000000000 Z
14
+ date: 2025-03-03 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: decidim-core
@@ -19,56 +19,42 @@ dependencies:
19
19
  requirements:
20
20
  - - '='
21
21
  - !ruby/object:Gem::Version
22
- version: 0.29.2
22
+ version: 0.30.0.rc2
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 0.29.2
30
- - !ruby/object:Gem::Dependency
31
- name: wicked_pdf
32
- requirement: !ruby/object:Gem::Requirement
33
- requirements:
34
- - - "~>"
35
- - !ruby/object:Gem::Version
36
- version: '2.1'
37
- type: :runtime
38
- prerelease: false
39
- version_requirements: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - "~>"
42
- - !ruby/object:Gem::Version
43
- version: '2.1'
29
+ version: 0.30.0.rc2
44
30
  - !ruby/object:Gem::Dependency
45
31
  name: decidim-admin
46
32
  requirement: !ruby/object:Gem::Requirement
47
33
  requirements:
48
34
  - - '='
49
35
  - !ruby/object:Gem::Version
50
- version: 0.29.2
36
+ version: 0.30.0.rc2
51
37
  type: :development
52
38
  prerelease: false
53
39
  version_requirements: !ruby/object:Gem::Requirement
54
40
  requirements:
55
41
  - - '='
56
42
  - !ruby/object:Gem::Version
57
- version: 0.29.2
43
+ version: 0.30.0.rc2
58
44
  - !ruby/object:Gem::Dependency
59
45
  name: decidim-dev
60
46
  requirement: !ruby/object:Gem::Requirement
61
47
  requirements:
62
48
  - - '='
63
49
  - !ruby/object:Gem::Version
64
- version: 0.29.2
50
+ version: 0.30.0.rc2
65
51
  type: :development
66
52
  prerelease: false
67
53
  version_requirements: !ruby/object:Gem::Requirement
68
54
  requirements:
69
55
  - - '='
70
56
  - !ruby/object:Gem::Version
71
- version: 0.29.2
57
+ version: 0.30.0.rc2
72
58
  description: A forms gem for decidim.
73
59
  email:
74
60
  - josepjaume@gmail.com
@@ -91,6 +77,7 @@ files:
91
77
  - app/cells/decidim/forms/step_navigation/show.erb
92
78
  - app/cells/decidim/forms/step_navigation_cell.rb
93
79
  - app/commands/decidim/forms/admin/update_questionnaire.rb
80
+ - app/commands/decidim/forms/admin/update_questions.rb
94
81
  - app/commands/decidim/forms/answer_questionnaire.rb
95
82
  - app/controllers/decidim/forms/admin/concerns/has_questionnaire.rb
96
83
  - app/controllers/decidim/forms/admin/concerns/has_questionnaire_answers.rb
@@ -100,6 +87,7 @@ files:
100
87
  - app/forms/decidim/forms/admin/question_form.rb
101
88
  - app/forms/decidim/forms/admin/question_matrix_row_form.rb
102
89
  - app/forms/decidim/forms/admin/questionnaire_form.rb
90
+ - app/forms/decidim/forms/admin/questions_form.rb
103
91
  - app/forms/decidim/forms/answer_choice_form.rb
104
92
  - app/forms/decidim/forms/answer_form.rb
105
93
  - app/forms/decidim/forms/questionnaire_form.rb
@@ -120,8 +108,6 @@ files:
120
108
  - app/models/decidim/forms/questionnaire.rb
121
109
  - app/packs/entrypoints/decidim_forms.js
122
110
  - app/packs/entrypoints/decidim_forms_admin.js
123
- - app/packs/entrypoints/decidim_questionnaire_answers_pdf.js
124
- - app/packs/entrypoints/decidim_questionnaire_answers_pdf.scss
125
111
  - app/packs/images/decidim/surveys/decidim_surveys.svg
126
112
  - app/packs/src/decidim/forms/admin/auto_buttons_by_min_items.component.js
127
113
  - app/packs/src/decidim/forms/admin/auto_select_options_by_total_items.component.js
@@ -129,14 +115,15 @@ files:
129
115
  - app/packs/src/decidim/forms/admin/collapsible_questions.js
130
116
  - app/packs/src/decidim/forms/admin/forms.js
131
117
  - app/packs/src/decidim/forms/admin/live_text_update.component.js
118
+ - app/packs/src/decidim/forms/admin/publish_answers_buttons.js
132
119
  - app/packs/src/decidim/forms/display_conditions.component.js
133
120
  - app/packs/src/decidim/forms/forms.js
134
121
  - app/packs/src/decidim/forms/max_choices_alert.component.js
135
122
  - app/packs/src/decidim/forms/option_attached_inputs.component.js
136
123
  - app/packs/stylesheets/decidim/forms/forms.scss
137
- - app/packs/stylesheets/decidim/forms/questionnaire-answers-pdf.scss
138
124
  - app/presenters/decidim/forms/admin/questionnaire_answer_presenter.rb
139
125
  - app/presenters/decidim/forms/admin/questionnaire_participant_presenter.rb
126
+ - app/presenters/decidim/forms/admin_log/question_presenter.rb
140
127
  - app/presenters/decidim/forms/admin_log/questionnaire_presenter.rb
141
128
  - app/presenters/decidim/forms/answer_option_presenter.rb
142
129
  - app/presenters/decidim/forms/question_presenter.rb
@@ -151,13 +138,13 @@ files:
151
138
  - app/views/decidim/forms/admin/questionnaires/_matrix_row.html.erb
152
139
  - app/views/decidim/forms/admin/questionnaires/_matrix_row_template.html.erb
153
140
  - app/views/decidim/forms/admin/questionnaires/_question.html.erb
141
+ - app/views/decidim/forms/admin/questionnaires/_questions_form.html.erb
154
142
  - app/views/decidim/forms/admin/questionnaires/_separator.html.erb
155
143
  - app/views/decidim/forms/admin/questionnaires/_title_and_description.html.erb
156
- - app/views/decidim/forms/admin/questionnaires/answers/export/_answer.html.erb
157
- - app/views/decidim/forms/admin/questionnaires/answers/export/pdf.html.erb
158
144
  - app/views/decidim/forms/admin/questionnaires/answers/index.html.erb
159
145
  - app/views/decidim/forms/admin/questionnaires/answers/show.html.erb
160
146
  - app/views/decidim/forms/admin/questionnaires/edit.html.erb
147
+ - app/views/decidim/forms/admin/questionnaires/edit_questions.html.erb
161
148
  - app/views/decidim/forms/questionnaires/_answer.html.erb
162
149
  - app/views/decidim/forms/questionnaires/_questionnaire.html.erb
163
150
  - app/views/decidim/forms/questionnaires/_questionnaire_readonly.html.erb
@@ -171,10 +158,9 @@ files:
171
158
  - app/views/decidim/forms/questionnaires/answers/_single_option.html.erb
172
159
  - app/views/decidim/forms/questionnaires/answers/_sorting.html.erb
173
160
  - app/views/decidim/forms/questionnaires/answers/_title_and_description.html.erb
161
+ - app/views/decidim/forms/questionnaires/edit.html.erb
174
162
  - app/views/decidim/forms/questionnaires/show.html.erb
175
- - app/views/layouts/decidim/forms/admin/questionnaires/questionnaire_answers.html.erb
176
163
  - config/assets.rb
177
- - config/initializers/wicked_pdf.rb
178
164
  - config/locales/am-ET.yml
179
165
  - config/locales/ar-SA.yml
180
166
  - config/locales/ar.yml
@@ -274,13 +260,13 @@ files:
274
260
  - db/migrate/20240402095253_add_matrix_row_counter_cache_to_questions.rb
275
261
  - db/migrate/20240416111953_add_display_conditions_counter_cache_to_questions.rb
276
262
  - db/migrate/20240416113926_add_display_conditions_for_other_questions_counter_cache_to_questions.rb
263
+ - db/migrate/20241122142230_add_survey_answers_published_at_to_questions.rb
277
264
  - decidim-forms.gemspec
278
265
  - lib/decidim/api/answer_option_type.rb
279
266
  - lib/decidim/api/question_type.rb
280
267
  - lib/decidim/api/questionnaire_entity_interface.rb
281
268
  - lib/decidim/api/questionnaire_type.rb
282
269
  - lib/decidim/exporters/form_pdf.rb
283
- - lib/decidim/exporters/form_pdf_controller_helper.rb
284
270
  - lib/decidim/forms.rb
285
271
  - lib/decidim/forms/admin.rb
286
272
  - lib/decidim/forms/admin_engine.rb
@@ -315,14 +301,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
315
301
  requirements:
316
302
  - - "~>"
317
303
  - !ruby/object:Gem::Version
318
- version: 3.2.0
304
+ version: 3.3.0
319
305
  required_rubygems_version: !ruby/object:Gem::Requirement
320
306
  requirements:
321
307
  - - ">="
322
308
  - !ruby/object:Gem::Version
323
309
  version: '0'
324
310
  requirements: []
325
- rubygems_version: 3.4.10
311
+ rubygems_version: 3.5.11
326
312
  signing_key:
327
313
  specification_version: 4
328
314
  summary: Decidim forms
@@ -1 +0,0 @@
1
- import "entrypoints/decidim_questionnaire_answers_pdf.scss"
@@ -1 +0,0 @@
1
- @import "stylesheets/decidim/forms/questionnaire-answers-pdf.scss";