Hide server password in server options

This commit is contained in:
Beu
2023-05-25 13:03:31 +02:00
parent cc46f63155
commit 32e00a8051
3 changed files with 74 additions and 4 deletions

View File

@ -53,6 +53,11 @@ class CheckBoxFeature extends ScriptFeature
*/
protected $disabledDesign = null;
/**
* @var string $customScript Script executed when clicking on the checkbox
*/
protected $customScript = "";
/**
* Construct a new CheckBox Feature
*
@ -199,6 +204,30 @@ class CheckBoxFeature extends ScriptFeature
return $this;
}
/**
* Get script launched when clicking on the checkbox
*
* @api
* @return string
*/
public function getCustomScript()
{
return $this->customScript;
}
/**
* Set script launched when clicking on the checkbox
*
* @api
* @param string $customScript script
* @return static
*/
public function setCustomScript(string $customScript)
{
$this->customScript = $customScript;
return $this;
}
/**
* @see ScriptFeature::prepare()
*/
@ -290,6 +319,7 @@ EntryId = \"{$entryId}\";
if (Event.ControlId == \"{$quadId}\") {
declare Quad_CheckBox <=> (Event.Control as CMlQuad);
" . self::FUNCTION_UPDATE_QUAD_DESIGN . "(Quad_CheckBox);
" . $this->customScript . "
}";
}