Skip to content

Commit 52a9fc2

Browse files
committed
fix(fieldsfield): restore mandatory field as read only
1 parent f6f01d7 commit 52a9fc2

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

inc/question.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class PluginFormcreatorQuestion extends CommonDBChild implements
5252
static public $items_id = 'plugin_formcreator_sections_id';
5353

5454
/** @var PluginFormcreatorFieldInterface|null $field a field describing the question denpending on its field type */
55-
private ?PluginFormcreatorFieldInterface $field = null;
55+
public ?PluginFormcreatorFieldInterface $field = null;
5656

5757
private $skipChecks = false;
5858

templates/field/fieldsfield.html.twig

+16
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,20 @@
7070
input_class: 'col-xxl-8',
7171
}) }}
7272
{% endif %}
73+
74+
{{ fields.nullField({
75+
label_class: 'col-xxl-4',
76+
input_class: 'col-xxl-8',
77+
}) }}
78+
79+
{{ fields.dropdownYesNo(
80+
'required',
81+
item.field.getField().fields['mandatory'],
82+
__('Required', 'formcreator'), {
83+
label_class: 'col-xxl-4',
84+
input_class: 'col-xxl-8',
85+
disabled: true,
86+
}
87+
) }}
88+
7389
{% endblock %}

0 commit comments

Comments
 (0)