N°3750 New data-input-typeattribute to fields container

This will allow easiest DOM manipulation in BeHat tests !
This commit is contained in:
Pierre Goiffon
2021-02-24 18:33:54 +01:00
parent 267f3ec7ca
commit 6a5c47887a
4 changed files with 260 additions and 193 deletions

View File

@@ -345,4 +345,9 @@ class Field extends UIContentBlock
{
$this->AddDataAttribute('input-id', $sInputId);
}
public function SetInputType(string $sInputType)
{
$this->AddDataAttribute('input-type', $sInputType);
}
}

View File

@@ -32,6 +32,7 @@ class FieldUIBlockFactory extends AbstractUIBlockFactory
'value_raw' => 'SetValueRaw',
'comments' => 'SetComments',
'input_id' => 'SetInputId',
'input_type' => 'SetInputType',
];
foreach ($aParamsMapping as $sParamKey => $sFieldMethod) {
self::UpdateFieldFromParams($oField, $sFieldMethod, $aParams, $sParamKey);