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