mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +02:00
Added container id to checkboxes element.
This commit is contained in:
@@ -2537,7 +2537,7 @@ class e_form
|
|||||||
}
|
}
|
||||||
|
|
||||||
$pre = (vartrue($options['label'])) ? "<label class='".$labelClass.$active."'{$labelTitle}>" : ""; // Bootstrap compatible markup
|
$pre = (vartrue($options['label'])) ? "<label class='".$labelClass.$active."'{$labelTitle}>" : ""; // Bootstrap compatible markup
|
||||||
$post = (vartrue($options['label'])) ? $options['label']."</label>" : "";
|
$post = (vartrue($options['label'])) ? "<span>".$options['label']."</span></label>" : "";
|
||||||
unset($options['label']); // not to be used as attribute;
|
unset($options['label']); // not to be used as attribute;
|
||||||
|
|
||||||
$text .= "<input type='checkbox' name='{$name}' value='{$value}'".$this->get_attributes($options, $name, $value)." />";
|
$text .= "<input type='checkbox' name='{$name}' value='{$value}'".$this->get_attributes($options, $name, $value)." />";
|
||||||
@@ -2559,7 +2559,7 @@ class e_form
|
|||||||
|
|
||||||
if(!is_array($checked)) $checked = explode(",",$checked);
|
if(!is_array($checked)) $checked = explode(",",$checked);
|
||||||
|
|
||||||
$text = "";
|
$text = array();
|
||||||
|
|
||||||
$cname = $name;
|
$cname = $name;
|
||||||
|
|
||||||
@@ -2588,14 +2588,21 @@ class e_form
|
|||||||
* and also failed in case it contained a "=" character
|
* and also failed in case it contained a "=" character
|
||||||
*/
|
*/
|
||||||
$options['label'] = $label;
|
$options['label'] = $label;
|
||||||
$text .= $this->checkbox($cname, $key, $c, $options);
|
$text[] = $this->checkbox($cname, $key, $c, $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$id = empty($options['id']) ? $this->name2id($name).'-container' : $options['id'];
|
||||||
|
|
||||||
// return print_a($checked,true);
|
// return print_a($checked,true);
|
||||||
|
if($options['list'])
|
||||||
|
{
|
||||||
|
return "<ul id='".$id."' class='checkboxes'><li>".implode("</li><li>",$text)."</li></ul>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(!empty($text))
|
if(!empty($text))
|
||||||
{
|
{
|
||||||
return "<div class='checkboxes' style='display:inline-block'>".$text."</div>";
|
return "<div id='".$id."' class='checkboxes' style='display:inline-block'>".implode("",$text)."</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
|
@@ -177,6 +177,7 @@ input.input-block-level,
|
|||||||
input.form-control.input-block-level,
|
input.form-control.input-block-level,
|
||||||
select.input-block-level { width: 100% }
|
select.input-block-level { width: 100% }
|
||||||
table label.checkbox { margin-left: 20px }
|
table label.checkbox { margin-left: 20px }
|
||||||
|
ul.checkboxes { display: inline-block; list-style: none; margin: 0; padding: 0;}
|
||||||
|
|
||||||
#admin-ui-nav-menu i.fa-chevron-right { margin-left: -10px }
|
#admin-ui-nav-menu i.fa-chevron-right { margin-left: -10px }
|
||||||
|
|
||||||
|
@@ -191,7 +191,7 @@ div.bbcode { margin: 15px 0px; clear: both; } /* layout control via bbcodes */
|
|||||||
|
|
||||||
.e-instant-edit { font-size: 10pt; position: absolute; right: 10px; text-align: right; display: inline-block; z-index:1000; margin-right:10px; }
|
.e-instant-edit { font-size: 10pt; position: absolute; right: 10px; text-align: right; display: inline-block; z-index:1000; margin-right:10px; }
|
||||||
|
|
||||||
|
ul.checkboxes { display: inline-block; list-style: none; margin: 0; padding: 0;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user