Skip to content

Commit b534f7e

Browse files
committed
fix: long text may be truncated
Signed-off-by: Thierry Bugier <[email protected]>
1 parent d103bb4 commit b534f7e

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

inc/field/radiosfield.class.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@ public function getTranslatableStrings(array $options = []) : array {
313313
if ($options['id'] != '' && $id != $options['id']) {
314314
continue;
315315
}
316-
$strings['text'][$id] = $value;
317-
$strings['id'][$id] = 'text';
316+
$strings['string'][$id] = $value;
317+
$strings['id'][$id] = 'string';
318318
}
319319

320320
return $strings;

inc/form.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public function rawSearchOptions() {
223223
'table' => $this::getTable(),
224224
'field' => 'content',
225225
'name' => _n('Header', 'Headers', 1, 'formcreator'),
226-
'datatype' => 'string',
226+
'datatype' => 'text',
227227
'massiveaction' => true
228228
];
229229

inc/question.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function rawSearchOptions() {
154154
'table' => $this::getTable(),
155155
'field' => 'description',
156156
'name' => __('Description'),
157-
'datatype' => 'string',
157+
'datatype' => 'text',
158158
'massiveaction' => false
159159
];
160160

inc/translation.class.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ public static function getEditor(PluginFormcreatorForm_Language $formLanguage, s
164164
$translatedString = $translations[$original] ?? '';
165165

166166
switch ($type) {
167-
case 'text':
168167
case 'itemlink':
168+
case 'string':
169169
echo '<td>' . $original . Html::hidden("id", ['value' => $id]) . '</td>';
170170
echo '<td>' . Html::input("value", ['value' => $translatedString]) . '</td>';
171171
break;
172172

173-
case 'string':
173+
case 'text':
174174
echo '<td>' . Html::entity_decode_deep($original) . Html::hidden("id", ['value' => $id]) . '</td>';
175175
echo '<td>' . Html::textarea([
176176
'name' => "value",

0 commit comments

Comments
 (0)