decidim-forms 0.27.1 → 0.27.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 +4 -4
- data/app/forms/decidim/forms/answer_form.rb +17 -2
- data/app/forms/decidim/forms/questionnaire_form.rb +4 -0
- data/app/models/decidim/forms/question.rb +4 -0
- data/app/views/decidim/forms/admin/questionnaires/_form.html.erb +1 -1
- data/app/views/decidim/forms/questionnaires/_answer.html.erb +2 -2
- data/app/views/decidim/forms/questionnaires/show.html.erb +1 -1
- data/config/locales/ca.yml +1 -1
- data/config/locales/eu.yml +41 -20
- data/config/locales/fa-IR.yml +1 -0
- data/config/locales/ka-GE.yml +1 -0
- data/config/locales/kaa.yml +1 -0
- data/config/locales/ro-RO.yml +1 -0
- data/config/locales/zh-TW.yml +191 -0
- data/lib/decidim/forms/test/shared_examples/has_questionnaire.rb +2 -1
- data/lib/decidim/forms/version.rb +1 -1
- metadata +11 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe0eacc810fb380764e96c7474000294dad78a56ff8fbba63da37ddad92da57a
|
4
|
+
data.tar.gz: d9d90aaf1e88deff5c8ad71fa685448a2a6e3ad0e73663c88a1e3567087b66b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74a496c438077dfc2404b9c832db751d43c166e8eb2ce6089b0c98c173d0fa615e34346a631bcbc2d1f1a48ac58a96de460bde7e23030c700751bb2ab5a458bb
|
7
|
+
data.tar.gz: 419adf2d45fb56a6e359015fda1bfc47d291c17295f5cab43c4780f3aad0e2d0c045c645a04972e20d9849d9a44f4bf36e94a45a956a4ac04a61c11430c34984
|
@@ -18,7 +18,7 @@ module Decidim
|
|
18
18
|
validates :selected_choices, presence: true, if: :mandatory_choices?
|
19
19
|
|
20
20
|
validate :max_choices, if: -> { question.max_choices }
|
21
|
-
validate :all_choices, if: -> { question.
|
21
|
+
validate :all_choices, if: -> { question.sorting? && question.mandatory? }
|
22
22
|
validate :min_choices, if: -> { question.matrix? && question.mandatory? }
|
23
23
|
validate :documents_present, if: -> { question.question_type == "files" && question.mandatory? }
|
24
24
|
validate :max_characters, if: -> { question.max_characters.positive? }
|
@@ -59,7 +59,22 @@ module Decidim
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def display_conditions_fulfilled?
|
62
|
-
question.display_conditions.
|
62
|
+
return optional_conditions_fulfilled? unless question.display_conditions.where(mandatory: true).any?
|
63
|
+
|
64
|
+
mandatory_conditions_fulfilled?
|
65
|
+
end
|
66
|
+
|
67
|
+
def mandatory_conditions_fulfilled?
|
68
|
+
question.display_conditions.where(mandatory: true).all? do |condition|
|
69
|
+
answer = context.responses&.find { |r| r.question_id&.to_i == condition.condition_question.id }
|
70
|
+
condition.fulfilled?(answer)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
def optional_conditions_fulfilled?
|
75
|
+
return true unless question.display_conditions.where(mandatory: false).any?
|
76
|
+
|
77
|
+
question.display_conditions.where(mandatory: false).any? do |condition|
|
63
78
|
answer = context.responses&.find { |r| r.question_id&.to_i == condition.condition_question.id }
|
64
79
|
condition.fulfilled?(answer)
|
65
80
|
end
|
@@ -4,6 +4,8 @@ module Decidim
|
|
4
4
|
module Forms
|
5
5
|
# This class holds a Form to answer a questionnaire from Decidim's public page.
|
6
6
|
class QuestionnaireForm < Decidim::Form
|
7
|
+
include ActiveModel::Validations::Callbacks
|
8
|
+
|
7
9
|
# as questionnaire uses "answers" for the database relationships is
|
8
10
|
# important not to use the same word here to avoid querying all the entries, resulting in a high performance penalty
|
9
11
|
attribute :responses, Array[AnswerForm]
|
@@ -12,6 +14,8 @@ module Decidim
|
|
12
14
|
|
13
15
|
attribute :tos_agreement, Boolean
|
14
16
|
|
17
|
+
before_validation :before_validation
|
18
|
+
|
15
19
|
validates :tos_agreement, allow_nil: false, acceptance: true
|
16
20
|
validate :session_token_in_context
|
17
21
|
|
@@ -31,7 +31,7 @@
|
|
31
31
|
<%= form.translated :editor, :description, toolbar: :full, lines: 30, label: t("models.components.description", scope: "decidim.forms.admin") %>
|
32
32
|
</div>
|
33
33
|
<div class="row column">
|
34
|
-
<%= form.translated :editor, :tos, toolbar: :
|
34
|
+
<%= form.translated :editor, :tos, toolbar: :content, lines: 10, label: t("models.components.tos", scope: "decidim.forms.admin") %>
|
35
35
|
</div>
|
36
36
|
</div>
|
37
37
|
</div>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<%= label_tag field_id, translated_attribute(answer.question.body), class: "questionnaire-title_and_description" %>
|
8
8
|
<% if translated_attribute(answer.question.description).present? %>
|
9
9
|
<div class="help-title_and_description ">
|
10
|
-
<%=
|
10
|
+
<%= decidim_sanitize_editor_admin translated_attribute(answer.question.description) %>
|
11
11
|
</div>
|
12
12
|
<% end %>
|
13
13
|
<%= render partial: "decidim/forms/questionnaires/answers/#{answer.question.question_type}", locals: { answer: answer, answer_form: answer_form, answer_idx: answer_idx, field_id: field_id, disabled: disabled } %>
|
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
<% if translated_attribute(answer.question.description).present? %>
|
24
24
|
<div class="help-text">
|
25
|
-
<%=
|
25
|
+
<%= decidim_sanitize_editor_admin translated_attribute(answer.question.description) %>
|
26
26
|
</div>
|
27
27
|
<% end %>
|
28
28
|
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<h2 class="section-heading"><%= translated_attribute questionnaire.title %></h2>
|
12
12
|
<div class="row">
|
13
13
|
<div class="columns large-<%= columns %> medium-centered lead">
|
14
|
-
<%=
|
14
|
+
<%= decidim_sanitize_editor_admin translated_attribute questionnaire.description %>
|
15
15
|
</div>
|
16
16
|
</div>
|
17
17
|
</div>
|
data/config/locales/ca.yml
CHANGED
@@ -175,7 +175,7 @@ ca:
|
|
175
175
|
tos_agreement: En participar acceptes els Termes i condicions d'ús
|
176
176
|
step_navigation:
|
177
177
|
show:
|
178
|
-
are_you_sure: Aquesta acció no es pot desfer i no podràs editar les teves respostes.
|
178
|
+
are_you_sure: Aquesta acció no es pot desfer i no podràs editar les teves respostes. Segur?
|
179
179
|
back: Enrere
|
180
180
|
continue: Continuar
|
181
181
|
submit: Enviar respostes
|
data/config/locales/eu.yml
CHANGED
@@ -10,7 +10,7 @@ eu:
|
|
10
10
|
max_choices: Gehienezko aukera kopurua
|
11
11
|
question_type: Mota
|
12
12
|
questionnaire_question:
|
13
|
-
mandatory:
|
13
|
+
mandatory: Derrigorrezkoa
|
14
14
|
max_characters: Karaktereen muga (utzi 0 mugarik ez badago)
|
15
15
|
errors:
|
16
16
|
models:
|
@@ -30,7 +30,7 @@ eu:
|
|
30
30
|
admin:
|
31
31
|
models:
|
32
32
|
components:
|
33
|
-
description:
|
33
|
+
description: Deskribapena
|
34
34
|
tos: Zerbitzu-baldintzak
|
35
35
|
questionnaires:
|
36
36
|
actions:
|
@@ -40,7 +40,7 @@ eu:
|
|
40
40
|
answer_option: Erantzun aukera
|
41
41
|
free_text: Testu librea
|
42
42
|
remove: Kendu
|
43
|
-
statement:
|
43
|
+
statement: Adierazpena
|
44
44
|
answers:
|
45
45
|
actions:
|
46
46
|
back: Itzuli erantzunetara
|
@@ -75,12 +75,13 @@ eu:
|
|
75
75
|
select_condition_question: Hautatu galdera bat
|
76
76
|
select_condition_type: Hautatu baldintza mota bat
|
77
77
|
edit:
|
78
|
-
save:
|
78
|
+
save: Gorde
|
79
79
|
title: Editatu galdetegia
|
80
80
|
form:
|
81
81
|
add_question: Gehitu galdera
|
82
82
|
add_separator: Gehitu banatzailea
|
83
|
-
|
83
|
+
add_title_and_description: Editatu izenburua eta deskribapena
|
84
|
+
already_answered_warning: Formularioa erabiltzaile batzuek erantzuten dute, beraz, ezin dira galderak aldatu.
|
84
85
|
collapse: Bildu galdera guztiak
|
85
86
|
expand: Zabaldu galdera guztiak
|
86
87
|
preview: Aurreikusi
|
@@ -89,7 +90,7 @@ eu:
|
|
89
90
|
matrix_row:
|
90
91
|
matrix_row: Errenkada
|
91
92
|
remove: Kendu
|
92
|
-
statement:
|
93
|
+
statement: Adierazpena
|
93
94
|
question:
|
94
95
|
add_answer_option: Gehitu erantzun aukera
|
95
96
|
add_display_condition: Gehitu bistaratzeko baldintza
|
@@ -97,26 +98,41 @@ eu:
|
|
97
98
|
add_matrix_row: Gehitu errenkada
|
98
99
|
any: Edozein
|
99
100
|
collapse: Bildu
|
100
|
-
description:
|
101
|
-
down:
|
101
|
+
description: Deskribapena
|
102
|
+
down: Behera
|
102
103
|
expand: Zabaldu
|
103
104
|
question: Galdera
|
104
105
|
remove: Kendu
|
105
|
-
statement:
|
106
|
-
up:
|
106
|
+
statement: Adierazpena
|
107
|
+
up: Gora
|
107
108
|
separator:
|
108
|
-
down:
|
109
|
+
down: Behera
|
109
110
|
remove: Kendu
|
110
111
|
separator: Bereizlea
|
111
|
-
up:
|
112
|
+
up: Gora
|
113
|
+
title_and_description:
|
114
|
+
collapse: Tolestu
|
115
|
+
description: Deskribapena
|
116
|
+
down: Behera
|
117
|
+
expand: Zabaldu
|
118
|
+
remove: Kendu
|
119
|
+
title: Izenburua
|
120
|
+
title_and_description: Izenburua eta deskribapena
|
121
|
+
up: Gora
|
112
122
|
update:
|
113
123
|
invalid: Akatsik egon da galdeketa gordetzean.
|
114
124
|
success: Galdetegia zuzen gorde da.
|
125
|
+
admin_log:
|
126
|
+
questionnaire:
|
127
|
+
update: "%{user_name} erabiltzaileak %{resource_name} galdetegia eguneratu du"
|
115
128
|
errors:
|
116
129
|
answer:
|
117
|
-
body:
|
130
|
+
body: Testua ezin da hutsik egon
|
118
131
|
images:
|
119
132
|
dimensions: "%{width} x %{height} px"
|
133
|
+
processors:
|
134
|
+
resize_and_pad: Irudi hau bigunduko eta birdimentsionatuko da %{dimensions} nehurrira.
|
135
|
+
resize_to_fit: Irudi hau bigunduko eta birdimentsionatuko da %{dimensions} nehurrira.
|
120
136
|
question_types:
|
121
137
|
files: Fitxategiak
|
122
138
|
long_answer: Erantzun luzea
|
@@ -125,23 +141,26 @@ eu:
|
|
125
141
|
multiple_option: Hainbat aukera
|
126
142
|
short_answer: Erantzun laburra
|
127
143
|
single_option: Aukera bakarra
|
128
|
-
sorting:
|
144
|
+
sorting: Sailkaketa
|
145
|
+
title_and_description: Izenburua eta deskribapena
|
146
|
+
questionnaire_answer_presenter:
|
147
|
+
download_attachment: Deskargatu eranskina
|
129
148
|
questionnaires:
|
130
149
|
answer:
|
131
|
-
invalid:
|
150
|
+
invalid: Akatsen bat gertatu da galdeketa erantzutean.
|
132
151
|
max_choices_alert: Aukera gehiegi daude hautatuta
|
133
|
-
success:
|
152
|
+
success: Formularioak ondo erantzun du.
|
134
153
|
question:
|
135
154
|
max_choices: 'Gehienezko aukerak: %{n}'
|
136
155
|
show:
|
137
156
|
answer_questionnaire:
|
138
157
|
anonymous_user_message: <a href="%{sign_in_link}">Hasi saioa zure kontuarekin</a> edo <a href="%{sign_up_link}">saioa hasi</a> galdetegiari erantzuteko.
|
139
|
-
title: Erantzun
|
158
|
+
title: Erantzun formularioari
|
140
159
|
current_step: '%{step} urratsa'
|
141
160
|
of_total_steps: '%{total_steps} etik'
|
142
161
|
questionnaire_answered:
|
143
162
|
body: Galdeketa honi erantzun dio.
|
144
|
-
title: Dagoeneko
|
163
|
+
title: Dagoeneko erantzunda
|
145
164
|
questionnaire_closed:
|
146
165
|
body: Galdetegia itxita dago eta ezin da erantzun.
|
147
166
|
title: Galdeketa itxia
|
@@ -151,7 +170,9 @@ eu:
|
|
151
170
|
questionnaire_js_disabled:
|
152
171
|
body: Galdetegi honen ezaugarri batzuk desaktibatu egingo dira. Zure esperientzia hobetzeko, gaitu JavaScript zure nabigatzailean.
|
153
172
|
title: Javascript desaktibatuta dago
|
154
|
-
|
173
|
+
questionnaire_not_published:
|
174
|
+
body: Argitalpen hau oraindik ez da argitaratu.
|
175
|
+
tos_agreement: Parte hartzean, haren zerbitzu-baldintzak onartzen dituzu
|
155
176
|
step_navigation:
|
156
177
|
show:
|
157
178
|
are_you_sure: Ekintza hau ezin da desegin eta ezin izango dituzu zure erantzunak editatu. Ziur zaude?
|
@@ -161,7 +182,7 @@ eu:
|
|
161
182
|
user_answers_serializer:
|
162
183
|
body: Erantzuna
|
163
184
|
completion: Amaiera
|
164
|
-
created_at:
|
185
|
+
created_at: Erantzunda
|
165
186
|
id: Erantzun IDa
|
166
187
|
ip_hash: IP Helbidearen Hash
|
167
188
|
question: Galdera
|
@@ -0,0 +1 @@
|
|
1
|
+
fa:
|
@@ -0,0 +1 @@
|
|
1
|
+
ka:
|
@@ -0,0 +1 @@
|
|
1
|
+
kaa:
|
data/config/locales/ro-RO.yml
CHANGED
@@ -131,6 +131,7 @@ ro:
|
|
131
131
|
images:
|
132
132
|
dimensions: "%{width} x %{height} px"
|
133
133
|
processors:
|
134
|
+
resize_and_pad: Această imagine va fi redimensionată pentru a se potrivi cu %{dimensions}.
|
134
135
|
resize_to_fit: Această imagine va fi redimensionată pentru a se potrivi cu %{dimensions}.
|
135
136
|
question_types:
|
136
137
|
files: Fișiere
|
data/config/locales/zh-TW.yml
CHANGED
@@ -1 +1,192 @@
|
|
1
|
+
---
|
1
2
|
zh-TW:
|
3
|
+
activemodel:
|
4
|
+
attributes:
|
5
|
+
answer:
|
6
|
+
body: 回答
|
7
|
+
choices: 選項
|
8
|
+
selected_choices: 已選擇的選項
|
9
|
+
question:
|
10
|
+
max_choices: 選擇的最大數量
|
11
|
+
question_type: 類別
|
12
|
+
questionnaire_question:
|
13
|
+
mandatory: 必填的
|
14
|
+
max_characters: 字元限制(如果不需要限制,請設為0)
|
15
|
+
errors:
|
16
|
+
models:
|
17
|
+
answer:
|
18
|
+
attributes:
|
19
|
+
add_documents:
|
20
|
+
needs_to_be_reattached: 需要重新附加
|
21
|
+
body:
|
22
|
+
too_long: 太長
|
23
|
+
choices:
|
24
|
+
missing: 尚未完成
|
25
|
+
too_many: 太多了
|
26
|
+
questionnaire:
|
27
|
+
request_invalid: 處理請求時發生錯誤,請再試一次
|
28
|
+
decidim:
|
29
|
+
forms:
|
30
|
+
admin:
|
31
|
+
models:
|
32
|
+
components:
|
33
|
+
description: 說明
|
34
|
+
tos: 服務條款
|
35
|
+
questionnaires:
|
36
|
+
actions:
|
37
|
+
back: 返回問題
|
38
|
+
show: 顯示回應
|
39
|
+
answer_option:
|
40
|
+
answer_option: 答案選項:
|
41
|
+
free_text: 免費文字
|
42
|
+
remove: 移除
|
43
|
+
statement: 聲明
|
44
|
+
answers:
|
45
|
+
actions:
|
46
|
+
back: 返回回覆
|
47
|
+
export: 匯出
|
48
|
+
show: 顯示答案
|
49
|
+
empty: 目前尚未回答
|
50
|
+
export:
|
51
|
+
answer:
|
52
|
+
title: '回應 #%{number}'
|
53
|
+
export_response:
|
54
|
+
title: 調查問卷使用者回答_%{token}
|
55
|
+
index:
|
56
|
+
title: "%{total} 個回應總數"
|
57
|
+
show:
|
58
|
+
title: '回答#%{number}'
|
59
|
+
display_condition:
|
60
|
+
answer_option: 答案選項
|
61
|
+
condition_question: 問題
|
62
|
+
condition_type: 條件
|
63
|
+
condition_types:
|
64
|
+
answered: 已回答
|
65
|
+
equal: 等於
|
66
|
+
match: 包含文字
|
67
|
+
not_answered: 未回答
|
68
|
+
not_equal: 不等於
|
69
|
+
condition_value: 包含文字
|
70
|
+
display_condition: 顯示條件
|
71
|
+
mandatory: 這個條件必須始終滿足,無論其他條件的狀態如何。
|
72
|
+
remove: 移除
|
73
|
+
save_warning: 在配置顯示條件之前,請記得保存表單。
|
74
|
+
select_answer_option: 選擇答案選項
|
75
|
+
select_condition_question: 選取一個問題
|
76
|
+
select_condition_type: 選擇一個條件類型
|
77
|
+
edit:
|
78
|
+
save: 儲存
|
79
|
+
title: 編輯問卷內容
|
80
|
+
form:
|
81
|
+
add_question: 新增問題
|
82
|
+
add_separator: 新增分隔線
|
83
|
+
add_title_and_description: 新增標題與描述
|
84
|
+
already_answered_warning: 已有使用者回答此表單,因此您無法修改問題。
|
85
|
+
collapse: 收起所有問題
|
86
|
+
expand: 展開所有問題
|
87
|
+
preview: 預覽
|
88
|
+
title: 編輯問卷表單%{questionnaire_for}
|
89
|
+
unpublished_warning: 此表單尚未發佈。您可以修改其問題,但這樣做將刪除目前的回答。
|
90
|
+
matrix_row:
|
91
|
+
matrix_row: 列
|
92
|
+
remove: 移除
|
93
|
+
statement: 聲明
|
94
|
+
question:
|
95
|
+
add_answer_option: 新增答案選項
|
96
|
+
add_display_condition: 新增顯示條件
|
97
|
+
add_display_condition_info: 請先儲存表單再設定顯示條件
|
98
|
+
add_matrix_row: 新增列
|
99
|
+
any: 任何
|
100
|
+
collapse: 收回
|
101
|
+
description: 說明
|
102
|
+
down: 向下
|
103
|
+
expand: 展開
|
104
|
+
question: 問題
|
105
|
+
remove: 移除
|
106
|
+
statement: 聲明
|
107
|
+
up: 往上
|
108
|
+
separator:
|
109
|
+
down: 向下
|
110
|
+
remove: 移除
|
111
|
+
separator: 分隔線
|
112
|
+
up: 往上
|
113
|
+
title_and_description:
|
114
|
+
collapse: 收回
|
115
|
+
description: 說明
|
116
|
+
down: 向下
|
117
|
+
expand: 展開
|
118
|
+
remove: 移除
|
119
|
+
title: 標題
|
120
|
+
title_and_description: 標題和描述
|
121
|
+
up: 往上
|
122
|
+
update:
|
123
|
+
invalid: 儲存表單時發生問題。
|
124
|
+
success: 表單已成功儲存。
|
125
|
+
admin_log:
|
126
|
+
questionnaire:
|
127
|
+
update: "%{user_name} 更新了 %{resource_name} 問卷模板"
|
128
|
+
errors:
|
129
|
+
answer:
|
130
|
+
body: 內容不能為空
|
131
|
+
images:
|
132
|
+
dimensions: "%{width} x %{height} 像素"
|
133
|
+
processors:
|
134
|
+
resize_and_pad: 圖片將被調整大小並填充至 %{dimensions}。
|
135
|
+
resize_to_fit: 此圖片將被調整大小以符合 %{dimensions}。
|
136
|
+
question_types:
|
137
|
+
files: 檔案
|
138
|
+
long_answer: 長回答
|
139
|
+
matrix_multiple: 矩陣(多重選項)
|
140
|
+
matrix_single: 矩陣(單一選項)
|
141
|
+
multiple_option: 多選
|
142
|
+
short_answer: 簡答
|
143
|
+
single_option: 單選
|
144
|
+
sorting: 排序中
|
145
|
+
title_and_description: 標題和描述
|
146
|
+
questionnaire_answer_presenter:
|
147
|
+
download_attachment: 下載附件
|
148
|
+
questionnaires:
|
149
|
+
answer:
|
150
|
+
invalid: 回答表單時出現問題
|
151
|
+
max_choices_alert: 選擇的項目太多了
|
152
|
+
success: 表單已成功回答
|
153
|
+
question:
|
154
|
+
max_choices: '最多選擇數量: %{n}'
|
155
|
+
show:
|
156
|
+
answer_questionnaire:
|
157
|
+
anonymous_user_message: <a href="%{sign_in_link}">使用現有帳號登入</a> 或 <a href="%{sign_up_link}">註冊新帳戶</a> 以回答此表單。
|
158
|
+
title: 回答表單
|
159
|
+
current_step: 步驟%{step}
|
160
|
+
of_total_steps: 的%{total_steps}
|
161
|
+
questionnaire_answered:
|
162
|
+
body: 您已經回答過此表格。
|
163
|
+
title: 已經回答
|
164
|
+
questionnaire_closed:
|
165
|
+
body: 該表格已關閉,無法回答。
|
166
|
+
title: 表單已關閉
|
167
|
+
questionnaire_for_private_users:
|
168
|
+
body: 此表單僅適用於私人使用者
|
169
|
+
title: 表單已關閉
|
170
|
+
questionnaire_js_disabled:
|
171
|
+
body: 此表單的某些功能將被禁用。為了改善您的體驗,請在您的瀏覽器中啟用JavaScript。
|
172
|
+
title: JavaScript已停用
|
173
|
+
questionnaire_not_published:
|
174
|
+
body: 此表單尚未發佈。
|
175
|
+
tos_agreement: 透過參與,您同意其服務條款
|
176
|
+
step_navigation:
|
177
|
+
show:
|
178
|
+
are_you_sure: 此操作無法撤消,您將無法編輯您的答案。您確定嗎?
|
179
|
+
back: 返回
|
180
|
+
continue: 繼續
|
181
|
+
submit: 提交
|
182
|
+
user_answers_serializer:
|
183
|
+
body: 回答
|
184
|
+
completion: 完成
|
185
|
+
created_at: 回答時間
|
186
|
+
id: 回答 ID
|
187
|
+
ip_hash: IP Hash
|
188
|
+
question: 問題
|
189
|
+
registered: 已註冊
|
190
|
+
session_token: 使用者識別碼
|
191
|
+
unregistered: 未註冊
|
192
|
+
user_status: 用戶狀態
|
@@ -538,12 +538,13 @@ shared_examples_for "has questionnaire" do
|
|
538
538
|
end
|
539
539
|
end
|
540
540
|
|
541
|
-
context "when question type is sorting" do
|
541
|
+
context "when question type is sorting and mandatory" do
|
542
542
|
let!(:question) do
|
543
543
|
create(
|
544
544
|
:questionnaire_question,
|
545
545
|
questionnaire: questionnaire,
|
546
546
|
question_type: "sorting",
|
547
|
+
mandatory: true,
|
547
548
|
options: [
|
548
549
|
{ "body" => { "en" => "chocolate" } },
|
549
550
|
{ "body" => { "en" => "like" } },
|
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.27.
|
4
|
+
version: 0.27.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:
|
14
|
+
date: 2023-05-11 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.27.
|
22
|
+
version: 0.27.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.27.
|
29
|
+
version: 0.27.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.27.
|
64
|
+
version: 0.27.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.27.
|
71
|
+
version: 0.27.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.27.
|
78
|
+
version: 0.27.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.27.
|
85
|
+
version: 0.27.3
|
86
86
|
description: A forms gem for decidim.
|
87
87
|
email:
|
88
88
|
- josepjaume@gmail.com
|
@@ -209,6 +209,7 @@ files:
|
|
209
209
|
- config/locales/et-EE.yml
|
210
210
|
- config/locales/et.yml
|
211
211
|
- config/locales/eu.yml
|
212
|
+
- config/locales/fa-IR.yml
|
212
213
|
- config/locales/fi-pl.yml
|
213
214
|
- config/locales/fi-plain.yml
|
214
215
|
- config/locales/fi.yml
|
@@ -226,6 +227,8 @@ files:
|
|
226
227
|
- config/locales/is.yml
|
227
228
|
- config/locales/it.yml
|
228
229
|
- config/locales/ja.yml
|
230
|
+
- config/locales/ka-GE.yml
|
231
|
+
- config/locales/kaa.yml
|
229
232
|
- config/locales/ko-KR.yml
|
230
233
|
- config/locales/ko.yml
|
231
234
|
- config/locales/lb-LU.yml
|