mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user