N°3769 Add data-input-type HTML attribute to fields in a transition form

Was only present in object edit mode :(
This commit is contained in:
Pierre Goiffon
2023-01-12 10:42:52 +01:00
parent 80a9ded404
commit d7b94fb123

View File

@@ -3409,9 +3409,10 @@ EOF
}
}
}
$sInputType = '';
$sHTMLValue = cmdbAbstractObject::GetFormElementForField($oPage, $sClass, $sAttCode, $oAttDef,
$this->Get($sAttCode), $this->GetEditValue($sAttCode), 'att_'.$iFieldIndex, '', $iExpectCode,
$aArgs);
$aArgs, true, $sInputType);
$aAttrib = array(
'label' => '<span>'.$oAttDef->GetLabel().'</span>',
'value' => "<span id=\"field_att_$iFieldIndex\">$sHTMLValue</span>",
@@ -3428,13 +3429,13 @@ EOF
$aAttrib['atttype'] = $sAttDefClass;
$aAttrib['attlabel'] = $sAttLabel;
// - Attribute flags
$aAttrib['attflags'] = $this->GetFormAttributeFlags($sAttCode) ;
$aAttrib['attflags'] = $this->GetFormAttributeFlags($sAttCode);
// - How the field should be rendered
$aAttrib['layout'] = (in_array($oAttDef->GetEditClass(), static::GetAttEditClassesToRenderAsLargeField())) ? 'large' : 'small';
$aAttrib['inputtype'] = $sInputType;
// - For simple fields, we get the raw (stored) value as well
$bExcludeRawValue = false;
foreach (static::GetAttDefClassesToExcludeFromMarkupMetadataRawValue() as $sAttDefClassToExclude)
{
foreach (static::GetAttDefClassesToExcludeFromMarkupMetadataRawValue() as $sAttDefClassToExclude) {
if (is_a($sAttDefClass, $sAttDefClassToExclude, true)) {
$bExcludeRawValue = true;
break;