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 ("");
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user