mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
New attribute 'display_style' for Strings, Enums and ExternalKeys: when the list is short, display it as a set of radio buttons instead of a drop-down list. Possible values: 'radio', 'radio_vertical' and 'radio_horizontal'. ('radio' == 'radio_vertical').
SVN:trunk[1426]
This commit is contained in:
@@ -1109,6 +1109,11 @@ class AttributeString extends AttributeDBField
|
||||
$sEscaped = str_replace($sFrom, $sTo, (string)$sValue);
|
||||
return $sTextQualifier.$sEscaped.$sTextQualifier;
|
||||
}
|
||||
|
||||
public function GetDisplayStyle()
|
||||
{
|
||||
return $this->GetOptional('display_style', 'select');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2355,6 +2360,7 @@ class AttributeExternalKey extends AttributeDBFieldVoid
|
||||
public function GetTargetClass($iType = EXTKEY_RELATIVE) {return $this->Get("targetclass");}
|
||||
public function GetKeyAttDef($iType = EXTKEY_RELATIVE){return $this;}
|
||||
public function GetKeyAttCode() {return $this->GetCode();}
|
||||
public function GetDisplayStyle() { return $this->GetOptional('display_style', 'select'); }
|
||||
|
||||
|
||||
public function GetDefaultValue() {return 0;}
|
||||
|
||||
Reference in New Issue
Block a user