commit
0f80a923ee
@ -835,7 +835,11 @@ class FormSetupItem
|
|||||||
} elseif ($this->type== 'color') {
|
} elseif ($this->type== 'color') {
|
||||||
$out.= $this->generateInputFieldColor();
|
$out.= $this->generateInputFieldColor();
|
||||||
} elseif ($this->type == 'yesno') {
|
} elseif ($this->type == 'yesno') {
|
||||||
$out.= $this->form->selectyesno($this->confKey, $this->fieldValue, 1);
|
if (!empty($conf->use_javascript_ajax)) {
|
||||||
|
$out.= ajax_constantonoff($this->confKey);
|
||||||
|
} else {
|
||||||
|
$out.= $this->form->selectyesno($this->confKey, $this->fieldValue, 1);
|
||||||
|
}
|
||||||
} elseif (preg_match('/emailtemplate:/', $this->type)) {
|
} elseif (preg_match('/emailtemplate:/', $this->type)) {
|
||||||
$out.= $this->generateInputFieldEmailTemplate();
|
$out.= $this->generateInputFieldEmailTemplate();
|
||||||
} elseif (preg_match('/category:/', $this->type)) {
|
} elseif (preg_match('/category:/', $this->type)) {
|
||||||
@ -1032,7 +1036,7 @@ class FormSetupItem
|
|||||||
*/
|
*/
|
||||||
public function generateOutputField()
|
public function generateOutputField()
|
||||||
{
|
{
|
||||||
global $conf, $user;
|
global $conf, $user, $langs;
|
||||||
|
|
||||||
if (!empty($this->fieldOverride)) {
|
if (!empty($this->fieldOverride)) {
|
||||||
return $this->fieldOverride;
|
return $this->fieldOverride;
|
||||||
@ -1057,7 +1061,15 @@ class FormSetupItem
|
|||||||
} elseif ($this->type== 'color') {
|
} elseif ($this->type== 'color') {
|
||||||
$out.= $this->generateOutputFieldColor();
|
$out.= $this->generateOutputFieldColor();
|
||||||
} elseif ($this->type == 'yesno') {
|
} elseif ($this->type == 'yesno') {
|
||||||
$out.= ajax_constantonoff($this->confKey);
|
if (!empty($conf->use_javascript_ajax)) {
|
||||||
|
$out.= ajax_constantonoff($this->confKey);
|
||||||
|
} else {
|
||||||
|
if ($this->fieldValue == 1) {
|
||||||
|
$out.= $langs->trans('yes');
|
||||||
|
} else {
|
||||||
|
$out.= $langs->trans('no');
|
||||||
|
}
|
||||||
|
}
|
||||||
} elseif (preg_match('/emailtemplate:/', $this->type)) {
|
} elseif (preg_match('/emailtemplate:/', $this->type)) {
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
|
||||||
$formmail = new FormMail($this->db);
|
$formmail = new FormMail($this->db);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user