form : checkbox are not correctely aligned when using "<div class='checkbox'>"

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2215 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2015-08-06 12:41:48 +00:00
parent 8a7857e403
commit 52b0da9bc8

View File

@@ -259,7 +259,10 @@ class formfield
$res .= "'>\n"; $res .= "'>\n";
$res .= " <label class='col-sm-2 control-label' for='". $res .= " <label class='col-sm-2 control-label' for='".
$this->formName."_"; $this->formName."_";
$res .= htmlspecialchars ($this->name, ENT_QUOTES)."_0'"; $res .= htmlspecialchars ($this->name, ENT_QUOTES);
if (count ($this->titles) > 1)
$res .= "_0";
$res .= "'";
if (isset ($this->hidden) && $this->hidden !== FALSE) if (isset ($this->hidden) && $this->hidden !== FALSE)
$res .= " style='display:none'"; $res .= " style='display:none'";
$res .= ">"; $res .= ">";
@@ -276,8 +279,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)."]";
if (count ($this->titles) > 1) if (count ($this->titles) > 1)
@@ -312,7 +314,8 @@ class formfield
} }
$res .= "/>"; $res .= "/>";
$res .= "$val\n"; $res .= "$val\n";
$res .= " </div>\n"; if (count ($this->titles) > 1)
$res .= "<br/>\n";
} }
if (isset ($this->errors) || isset ($this->help)) if (isset ($this->errors) || isset ($this->help))