support transient fields
This commit is contained in:
parent
04a4a8f5ad
commit
a9bf201212
|
@ -357,6 +357,8 @@ class htmlInputField extends htmlElement {
|
||||||
private $isEnabled = true;
|
private $isEnabled = true;
|
||||||
/** indicates that the value should be saved in obfuscated form */
|
/** indicates that the value should be saved in obfuscated form */
|
||||||
private $obfuscate = false;
|
private $obfuscate = false;
|
||||||
|
/** indicates that this field should not automatically be saved in the self service or server profile */
|
||||||
|
private $transient = false;
|
||||||
/** required field */
|
/** required field */
|
||||||
protected $required = false;
|
protected $required = false;
|
||||||
/** validation rule */
|
/** validation rule */
|
||||||
|
@ -433,6 +435,9 @@ class htmlInputField extends htmlElement {
|
||||||
$disabled = ' disabled';
|
$disabled = ' disabled';
|
||||||
}
|
}
|
||||||
echo '<input type="' . $inputType . '"' . $class . $name . $id . $value . $maxLength . $size . $fieldTabIndex . $disabled . '>';
|
echo '<input type="' . $inputType . '"' . $class . $name . $id . $value . $maxLength . $size . $fieldTabIndex . $disabled . '>';
|
||||||
|
if ($this->transient) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
if ($this->obfuscate) {
|
if ($this->obfuscate) {
|
||||||
return array($this->fieldName => 'text_obfuscated');
|
return array($this->fieldName => 'text_obfuscated');
|
||||||
}
|
}
|
||||||
|
@ -486,6 +491,15 @@ class htmlInputField extends htmlElement {
|
||||||
$this->obfuscate = $obfuscate;
|
$this->obfuscate = $obfuscate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies that the value should not be automatically saved when used in self service or server profile (default: false).
|
||||||
|
*
|
||||||
|
* @param boolean $transient transient field
|
||||||
|
*/
|
||||||
|
public function setTransient($transient) {
|
||||||
|
$this->transient = $transient;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies if the input field is required.
|
* Specifies if the input field is required.
|
||||||
*
|
*
|
||||||
|
@ -683,7 +697,7 @@ class htmlButton extends htmlElement {
|
||||||
// image button
|
// image button
|
||||||
if ($this->isImageButton) {
|
if ($this->isImageButton) {
|
||||||
$class = ' class="smallImageButton"';
|
$class = ' class="smallImageButton"';
|
||||||
$style = ' style="background-image: url(../../graphics/' . $this->value . ');"';
|
$style = ' style="background-image: url(../../graphics/' . $this->value . '); background-color: transparent;"';
|
||||||
}
|
}
|
||||||
// text button
|
// text button
|
||||||
elseif ($this->iconClass == null) {
|
elseif ($this->iconClass == null) {
|
||||||
|
@ -819,6 +833,8 @@ class htmlSelect extends htmlElement {
|
||||||
private $transformSingleSelect = true;
|
private $transformSingleSelect = true;
|
||||||
/** onchange event */
|
/** onchange event */
|
||||||
private $onchangeEvent = null;
|
private $onchangeEvent = null;
|
||||||
|
/** indicates that this field should not automatically be saved in the self service or server profile */
|
||||||
|
private $transient = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
@ -920,6 +936,9 @@ class htmlSelect extends htmlElement {
|
||||||
elseif (sizeof($this->elements) == 0) {
|
elseif (sizeof($this->elements) == 0) {
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
|
if ($this->transient) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
if ($this->multiSelect) {
|
if ($this->multiSelect) {
|
||||||
return array($this->name => 'multiselect');
|
return array($this->name => 'multiselect');
|
||||||
}
|
}
|
||||||
|
@ -1047,6 +1066,15 @@ class htmlSelect extends htmlElement {
|
||||||
$this->onchangeEvent = htmlspecialchars($onchangeEvent);
|
$this->onchangeEvent = htmlspecialchars($onchangeEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies that the value should not be automatically saved when used in self service or server profile (default: false).
|
||||||
|
*
|
||||||
|
* @param boolean $transient transient field
|
||||||
|
*/
|
||||||
|
public function setTransient($transient) {
|
||||||
|
$this->transient = $transient;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue