From 93fd5c9e7db2fb05ce7688b24dd7dc48d110da0d Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Fri, 5 Aug 2022 17:55:39 +0200 Subject: [PATCH] corection lang --- htdocs/core/class/html.formsetup.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.formsetup.class.php b/htdocs/core/class/html.formsetup.class.php index a6b4c96e7ad..87fc937429c 100644 --- a/htdocs/core/class/html.formsetup.class.php +++ b/htdocs/core/class/html.formsetup.class.php @@ -1036,7 +1036,7 @@ class FormSetupItem */ public function generateOutputField() { - global $conf, $user; + global $conf, $user, $langs; if (!empty($this->fieldOverride)) { return $this->fieldOverride; @@ -1064,10 +1064,10 @@ class FormSetupItem if (!empty($conf->use_javascript_ajax)) { $out.= ajax_constantonoff($this->confKey); } else { - if ($this->confKey == 1) { - $out.= $this->langs('yes'); + if ($this->fieldValue == 1) { + $out.= $langs->trans('yes'); } else { - $out.= $this->langs('no'); + $out.= $langs->trans('no'); } } } elseif (preg_match('/emailtemplate:/', $this->type)) {