form : display correctely the checkboxes (add label and div='checkbox')

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3105 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2016-09-30 11:15:56 +00:00
parent 59e38dff4e
commit 2ea05e91ca

View File

@@ -433,6 +433,7 @@ class formfield
$this->titles = array ("");
foreach ($this->titles as $key=>$val)
{
$res .= " <div class='checkbox'>\n";
$res .= " <input type='hidden'";
$res .= " name='$this->formName"."[";
$res .= htmlspecialchars ($this->name, ENT_QUOTES)."]";
@@ -440,6 +441,11 @@ class formfield
$res .= "[$key]";
$res .= "' value='unset'";
$res .= "/>";
$res .= "<label for='$this->formName"."_";
$res .= htmlspecialchars ($this->name, ENT_QUOTES)."_";
if (count ($this->titles) > 1)
$res .= "$key";
$res .= "'>";
$res .= "<input type='checkbox'";
$res .= " name='$this->formName"."[";
$res .= htmlspecialchars ($this->name, ENT_QUOTES)."]";
@@ -492,9 +498,8 @@ class formfield
$res .= htmlspecialchars ($this->name, ENT_QUOTES)."_help'";
}
$res .= "/>";
$res .= "$val\n";
if (count ($this->titles) > 1)
$res .= "<br/>\n";
$res .= "$val</label>\n";
$res .= "</div>\n";
}
if (isset ($this->errors) || isset ($this->help))