mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 18:09:06 +01:00
LSattribute & LSattr_html: fix handling current/provided data
This commit is contained in:
parent
3ddc51004f
commit
d0397ec41e
2 changed files with 10 additions and 5 deletions
|
@ -118,7 +118,7 @@ class LSattr_html extends LSlog_staticLoggerClass {
|
||||||
* @retval array The values to be displayed in the LSform
|
* @retval array The values to be displayed in the LSform
|
||||||
**/
|
**/
|
||||||
public function getFormVal($data) {
|
public function getFormVal($data) {
|
||||||
return $this -> attribute -> getDisplayValue();
|
return $this -> attribute -> getDisplayValue($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -410,14 +410,19 @@ class LSattribute extends LSlog_staticLoggerClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne la valeur a afficher dans le formulaire
|
* Return the form display value
|
||||||
|
*
|
||||||
|
* @param[in] $data mixed Custom attribute data (optional, default: current attribute data)
|
||||||
*
|
*
|
||||||
* @author Benjamin Renard <brenard@easter-eggs.com>
|
* @author Benjamin Renard <brenard@easter-eggs.com>
|
||||||
*
|
*
|
||||||
* @retval string La valeur a afficher dans le formulaire.
|
* @retval string The form display value
|
||||||
*/
|
*/
|
||||||
public function getFormVal() {
|
public function getFormVal($data=null) {
|
||||||
return ensureIsArray($this -> html -> getFormVal($this -> data));
|
if (is_null($data)) {
|
||||||
|
$data = ($this -> isUpdate()?$this -> updateData:$this -> data);
|
||||||
|
}
|
||||||
|
return ensureIsArray($this -> html -> getFormVal($data));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue