decidim-forms 0.26.2 → 0.26.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c05c5c0a4333cc4dbefaa5e8d37fa861059a6881d5d47d075fd618e7f7169826
4
- data.tar.gz: f46c7ea6704161d57385dd589360b78fe3763057e532640004cbb539aee5c0e4
3
+ metadata.gz: '0871028476cb2a15f8d4920d8a0ea89f5999be102074b8175e3283366ec5ab02'
4
+ data.tar.gz: d6032d10fb1d83ee2916bacd59a31dfa2ec0f72835a26075cb26c9560288a9bc
5
5
  SHA512:
6
- metadata.gz: fb39a317c541eca9a1d3ed286b8b3873a79bc7f748a37ae4a20a693e19900b473b6e83f46ec82d07c3d5d5b603143d5d46327addfd19d99f014f163f8a741775
7
- data.tar.gz: 593ac4089260f909886fa7b05de438d2da561a4d5801742044c79a7c2ee5343c1c59df55282c8fd18af036ce272fc04329c3ef9bb04699de5cf5182dd361ed36
6
+ metadata.gz: 619c70c7a005fac00201dd21ff0f7a4e4a815760faf79c96a95e2046a2446999aec0f03758348a1aaa4fefca523153323bfce49e7c5b3535fad16b03ca002c5e
7
+ data.tar.gz: 74ff353cabf1d670bf32365cdbed9f93eb4365bcefc1d7cf54b92b574918e7c81ae69477e66b6395f2d9c206e7254e220516f720204a93b81dc95c065a4b6b9a
@@ -43,7 +43,7 @@ module Decidim
43
43
  # of this problem.
44
44
  def reset_form_attachments
45
45
  @form.responses.each do |answer|
46
- answer.errors.add(:add_documents, :needs_to_be_reattached) if answer.has_attachments?
46
+ answer.errors.add(:add_documents, :needs_to_be_reattached) if answer.has_attachments? || answer.has_error_in_attachments?
47
47
  end
48
48
  end
49
49
 
@@ -51,7 +51,7 @@ module Decidim
51
51
  @main_form = @form
52
52
  @errors = nil
53
53
 
54
- Answer.transaction do
54
+ Answer.transaction(requires_new: true) do
55
55
  form.responses_by_step.flatten.select(&:display_conditions_fulfilled?).each do |form_answer|
56
56
  answer = Answer.new(
57
57
  user: @current_user,
@@ -69,6 +69,10 @@ module Decidim
69
69
  question.has_attachments? && errors[:add_documents].empty? && add_documents.present?
70
70
  end
71
71
 
72
+ def has_error_in_attachments?
73
+ errors[:add_documents].present?
74
+ end
75
+
72
76
  private
73
77
 
74
78
  def mandatory_body?
@@ -11,6 +11,7 @@ import createSortList from "src/decidim/admin/sort_list.component"
11
11
  import createDynamicFields from "src/decidim/admin/dynamic_fields.component"
12
12
  import createFieldDependentInputs from "src/decidim/admin/field_dependent_inputs.component"
13
13
  import createQuillEditor from "src/decidim/editor"
14
+ import initLanguageChangeSelect from "src/decidim/admin/choose_language"
14
15
 
15
16
  export default function createEditableForm() {
16
17
  const wrapperSelector = ".questionnaire-questions";
@@ -392,6 +393,8 @@ export default function createEditableForm() {
392
393
 
393
394
  autoLabelByPosition.run();
394
395
  autoButtonsByPosition.run();
396
+
397
+ initLanguageChangeSelect($field.find("select.language-change").toArray());
395
398
  },
396
399
  onRemoveField: ($field) => {
397
400
  autoLabelByPosition.run();
@@ -5,7 +5,7 @@
5
5
 
6
6
  <% columns = allow_answers? && visitor_can_answer? && @form.responses.map(&:question).any?(&:matrix?) ? 9 : 6 %>
7
7
 
8
- <%= render partial: "decidim/shared/component_announcement" %>
8
+ <%= render partial: "decidim/shared/component_announcement" if current_component.manifest_name == "surveys" %>
9
9
 
10
10
  <div class="row columns">
11
11
  <h2 class="section-heading"><%= translated_attribute questionnaire.title %></h2>
@@ -1 +1,189 @@
1
1
  lt:
2
+ activemodel:
3
+ attributes:
4
+ answer:
5
+ body: Atsakymas
6
+ choices: Pasirinkimai
7
+ selected_choices: Pasirinkti pasirinkimai
8
+ question:
9
+ max_choices: Maksimalus pasirinkimų skaičius
10
+ question_type: Tipas
11
+ questionnaire_question:
12
+ mandatory: Privaloma
13
+ max_characters: Simbolių limitas (palikti 0 jei limito nėra)
14
+ errors:
15
+ models:
16
+ answer:
17
+ attributes:
18
+ add_documents:
19
+ needs_to_be_reattached: Reikia pridėti iš naujo
20
+ body:
21
+ too_long: per ilgas
22
+ choices:
23
+ missing: nepilnas - trūksta elementų
24
+ too_many: per daug
25
+ questionnaire:
26
+ request_invalid: Tvarkant prašymą įvyko klaida. Bandykite dar kartą
27
+ decidim:
28
+ forms:
29
+ admin:
30
+ models:
31
+ components:
32
+ description: Aprašymas
33
+ tos: Paslaugų teikimo sąlygos
34
+ questionnaires:
35
+ actions:
36
+ back: Grįžti į klausimus
37
+ show: Rodyti atsakymus
38
+ answer_option:
39
+ answer_option: Atsakymo variantas
40
+ free_text: Laisva forma
41
+ remove: Pašalinti
42
+ statement: Pareiškimas
43
+ answers:
44
+ actions:
45
+ back: Grįžti į atsakymus
46
+ export: Eksportuoti
47
+ show: Rodyti atsakymus
48
+ empty: Atsakymų dar nėra
49
+ export:
50
+ answer:
51
+ title: 'Atsakymas #%{number}'
52
+ export_response:
53
+ title: apklausa_naudotoju_atsakymai_%{token}
54
+ index:
55
+ title: "%{total} iš viso atsakymų"
56
+ show:
57
+ title: 'Atsakymas #%{number}'
58
+ display_condition:
59
+ answer_option: Atsakymo variantas
60
+ condition_question: Klausimas
61
+ condition_type: Sąlyga
62
+ condition_types:
63
+ answered: Atsakyta
64
+ equal: Lygu
65
+ match: Įskaitant tekstą
66
+ not_answered: Neatsakyta
67
+ not_equal: Nelygu
68
+ condition_value: Įskaitytas tekstas
69
+ display_condition: Rodymo sąlyga
70
+ mandatory: Ši sąlyga turi būti patenkinta visada, neatsižvelgiant į kitų sąlygų statusą
71
+ remove: Pašalinti
72
+ save_warning: Prieš konfigūruodami rodymo sąlygas, nepamirškite išsaugoti formos
73
+ select_answer_option: Pasirinkite atsakymo variantą
74
+ select_condition_question: Pasirinkite klausimą
75
+ select_condition_type: Pasirinkti sąlygos tipą
76
+ edit:
77
+ save: Išsaugoti
78
+ title: Redaguoti klausimyną
79
+ form:
80
+ add_question: Pridėti klausimą
81
+ add_separator: Pridėti skyriklį
82
+ add_title_and_description: Pridėti pavadinimą ir aprašymą
83
+ already_answered_warning: Kai kurie naudotojai jau atsakė į formos klausimus, todėl jos klausimų keisti nebegalite.
84
+ collapse: Suskleisti visus klausimus
85
+ expand: Išskleisti visus klausimus
86
+ preview: Peržiūra
87
+ title: Taisyti %{questionnaire_for} formą
88
+ unpublished_warning: Forma nepaskelbta. Galite keisti klausimus, tačiau tai darydami pašalinsite esamus atsakymus.
89
+ matrix_row:
90
+ matrix_row: Eilutė
91
+ remove: Pašalinti
92
+ statement: Pareiškimas
93
+ question:
94
+ add_answer_option: Pridėti atsakymo variantą
95
+ add_display_condition: Pridėti rodymo sąlygą
96
+ add_display_condition_info: Išsaugokite formą, kad galėtumėt konfiguruoti rodymo sąlygas
97
+ add_matrix_row: Pridėti eilutę
98
+ any: Bet koks
99
+ collapse: Suskleisti
100
+ description: Aprašymas
101
+ down: Žemyn
102
+ expand: Išplėsti
103
+ question: Klausimas
104
+ remove: Pašalinti
105
+ statement: Pareiškimas
106
+ up: Į viršų
107
+ separator:
108
+ down: Žemyn
109
+ remove: Pašalinti
110
+ separator: Skirtukas
111
+ up: Į viršų
112
+ title_and_description:
113
+ collapse: Suskleisti
114
+ description: Aprašymas
115
+ down: Žemyn
116
+ expand: Išplėsti
117
+ remove: Pašalinti
118
+ title: Pavadinimas
119
+ title_and_description: Pavadinimas ir aprašymas
120
+ up: Aukštyn
121
+ update:
122
+ invalid: Išsaugant šią formą iškilo problema.
123
+ success: Forma sėkmingai išsaugota.
124
+ errors:
125
+ answer:
126
+ body: Pagrindinė dalis negali būti tuščia
127
+ files:
128
+ extension_allowlist: 'Priimtini formatai:'
129
+ images:
130
+ dimensions: "%{width} x %{height} px"
131
+ dimensions_info: 'Šis vaizdas bus:'
132
+ processors:
133
+ resize_and_pad: Pakeisto dydžio ir užpildytas iki
134
+ resize_to_fit: Pakeistas dydis, kad tilptų
135
+ question_types:
136
+ files: Dokumentai
137
+ long_answer: Ilgas atsakymas
138
+ matrix_multiple: Matrica (su keliais variantais)
139
+ matrix_single: Matrica (vienas variantas)
140
+ multiple_option: Keli variantai
141
+ short_answer: Trumpas atsakymas
142
+ single_option: Vienas variantas
143
+ sorting: Rūšiavimas
144
+ title_and_description: Pavadinimas ir aprašymas
145
+ questionnaires:
146
+ answer:
147
+ invalid: Atsakant į šią formą iškilo problema.
148
+ max_choices_alert: Per daug pasirinktų variantų
149
+ success: Į formos klausimus atsakyta.
150
+ question:
151
+ max_choices: 'Didžiausias pasirinkčių skaičius: %{n}'
152
+ show:
153
+ answer_questionnaire:
154
+ anonymous_user_message: <a href="%{sign_in_link}">Prisijunkite su savo paskyra</a> arba <a href="%{sign_up_link}">užsiregistruokite</a> norėdami užpildyti formą.
155
+ title: Atsakyti į formos klausimus
156
+ current_step: Žingsnis %{step}
157
+ of_total_steps: iš%{total_steps}
158
+ questionnaire_answered:
159
+ body: Jau atsakėte iš šios formos klausimus.
160
+ title: Jau atsakyta
161
+ questionnaire_closed:
162
+ body: Forma uždaryta ir į ją atsakyti negalima.
163
+ title: Forma uždaryta
164
+ questionnaire_for_private_users:
165
+ body: Forma pateikiama tik privatiems naudotojams
166
+ title: Forma uždaryta
167
+ questionnaire_js_disabled:
168
+ body: Kai kurie šios formos funkcionalumai bus neaktyvūs. Kad pagerintumėte naudojimo patirtį, naršyklėje įjunkite „JavaScript“.
169
+ title: '„JavaScript“ išjungta'
170
+ questionnaire_not_published:
171
+ body: Ši forma dar nepaskelbta.
172
+ tos_agreement: Dalyvaudami sutinkate su paslaugos teikimo sąlygomis
173
+ step_navigation:
174
+ show:
175
+ are_you_sure: Šio veiksmo atšaukti negalima ir savo atsakymų keisti negalėsite. Ar esate įsitikinę?
176
+ back: Atgal
177
+ continue: Tęsti
178
+ submit: Pateikti
179
+ user_answers_serializer:
180
+ body: Atsakymas
181
+ completion: Užbaigimas
182
+ created_at: Atsakyta
183
+ id: Atsakymo ID
184
+ ip_hash: IP adreso "hash" kodas
185
+ question: Klausimas
186
+ registered: Užregistruota
187
+ session_token: Naudotojo identifikatorius
188
+ unregistered: Neregistruoti
189
+ user_status: Naudotojo būsena
@@ -0,0 +1 @@
1
+ oc:
@@ -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.26.2"
7
+ "0.26.3"
8
8
  end
9
9
  end
10
10
  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.26.2
4
+ version: 0.26.3
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: 2022-06-14 00:00:00.000000000 Z
14
+ date: 2022-09-29 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: decidim-core
@@ -19,14 +19,14 @@ dependencies:
19
19
  requirements:
20
20
  - - '='
21
21
  - !ruby/object:Gem::Version
22
- version: 0.26.2
22
+ version: 0.26.3
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.26.2
29
+ version: 0.26.3
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: wicked_pdf
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -61,28 +61,28 @@ dependencies:
61
61
  requirements:
62
62
  - - '='
63
63
  - !ruby/object:Gem::Version
64
- version: 0.26.2
64
+ version: 0.26.3
65
65
  type: :development
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - '='
70
70
  - !ruby/object:Gem::Version
71
- version: 0.26.2
71
+ version: 0.26.3
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: decidim-dev
74
74
  requirement: !ruby/object:Gem::Requirement
75
75
  requirements:
76
76
  - - '='
77
77
  - !ruby/object:Gem::Version
78
- version: 0.26.2
78
+ version: 0.26.3
79
79
  type: :development
80
80
  prerelease: false
81
81
  version_requirements: !ruby/object:Gem::Requirement
82
82
  requirements:
83
83
  - - '='
84
84
  - !ruby/object:Gem::Version
85
- version: 0.26.2
85
+ version: 0.26.3
86
86
  description: A forms gem for decidim.
87
87
  email:
88
88
  - josepjaume@gmail.com
@@ -235,6 +235,7 @@ files:
235
235
  - config/locales/mt.yml
236
236
  - config/locales/nl.yml
237
237
  - config/locales/no.yml
238
+ - config/locales/oc-FR.yml
238
239
  - config/locales/om-ET.yml
239
240
  - config/locales/pl.yml
240
241
  - config/locales/pt-BR.yml