mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
Custom Fields: API to detect forms containing only hidden fields
SVN:trunk[4095]
This commit is contained in:
@@ -406,6 +406,25 @@ class Form
|
||||
return ($this->GetEditableFieldCount() > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the form has at least one editable field
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function HasVisibleFields()
|
||||
{
|
||||
$bRet = false;
|
||||
foreach ($this->aFields as $oField)
|
||||
{
|
||||
if (!$oField->GetHidden())
|
||||
{
|
||||
$bRet = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $bRet;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $sFormPath
|
||||
* @return Form|null
|
||||
|
||||
Reference in New Issue
Block a user