add setAsSelectUser
This commit is contained in:
parent
eccb61e95d
commit
fba22c8883
@ -833,6 +833,8 @@ class FormSetupItem
|
|||||||
$out.= $this->generateInputFieldMultiSelect();
|
$out.= $this->generateInputFieldMultiSelect();
|
||||||
} elseif ($this->type == 'select') {
|
} elseif ($this->type == 'select') {
|
||||||
$out.= $this->generateInputFieldSelect();
|
$out.= $this->generateInputFieldSelect();
|
||||||
|
} elseif ($this->type == 'selectUser') {
|
||||||
|
$out.= $this->generateInputFieldSelectUser();
|
||||||
} elseif ($this->type == 'textarea') {
|
} elseif ($this->type == 'textarea') {
|
||||||
$out.= $this->generateInputFieldTextarea();
|
$out.= $this->generateInputFieldTextarea();
|
||||||
} elseif ($this->type== 'html') {
|
} elseif ($this->type== 'html') {
|
||||||
@ -992,6 +994,14 @@ class FormSetupItem
|
|||||||
return $this->form->selectarray($this->confKey, $this->fieldOptions, $this->fieldValue);
|
return $this->form->selectarray($this->confKey, $this->fieldOptions, $this->fieldValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function generateInputFieldSelectUser()
|
||||||
|
{
|
||||||
|
return $this->form->select_dolusers($this->fieldValue, $this->confKey);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the type : used for old module builder setup conf style conversion and tests
|
* get the type : used for old module builder setup conf style conversion and tests
|
||||||
* because this two class will quickly evolve it's important to not set or get directly $this->type (will be protected) so this method exist
|
* because this two class will quickly evolve it's important to not set or get directly $this->type (will be protected) so this method exist
|
||||||
@ -1066,6 +1076,8 @@ class FormSetupItem
|
|||||||
$out.= $this->generateOutputFieldMultiSelect();
|
$out.= $this->generateOutputFieldMultiSelect();
|
||||||
} elseif ($this->type == 'select') {
|
} elseif ($this->type == 'select') {
|
||||||
$out.= $this->generateOutputFieldSelect();
|
$out.= $this->generateOutputFieldSelect();
|
||||||
|
} elseif ($this->type == 'selectUser') {
|
||||||
|
$out.= $this->generateOutputFieldSelectUser();
|
||||||
} elseif ($this->type== 'html') {
|
} elseif ($this->type== 'html') {
|
||||||
$out.= $this->fieldValue;
|
$out.= $this->fieldValue;
|
||||||
} elseif ($this->type== 'color') {
|
} elseif ($this->type== 'color') {
|
||||||
@ -1185,6 +1197,17 @@ class FormSetupItem
|
|||||||
return $outPut;
|
return $outPut;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function generateOutputFieldSelectUser()
|
||||||
|
{
|
||||||
|
$outPut = '';
|
||||||
|
$user = new User($this->db);
|
||||||
|
$user->fetch($this->fieldValue);
|
||||||
|
$outPut = $user->firstname . " " . $user->lastname;
|
||||||
|
return $outPut;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* METHODS FOR SETTING DISPLAY TYPE
|
* METHODS FOR SETTING DISPLAY TYPE
|
||||||
*/
|
*/
|
||||||
@ -1335,4 +1358,16 @@ class FormSetupItem
|
|||||||
$this->type = 'select';
|
$this->type = 'select';
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set type of input as a simple title
|
||||||
|
* no data to store
|
||||||
|
* @param array $fieldOptions A table of field options
|
||||||
|
* @return self
|
||||||
|
*/
|
||||||
|
public function setAsSelectUser()
|
||||||
|
{
|
||||||
|
$this->type = 'selectUser';
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user