Skip to content

Commit 6bcca88

Browse files
committed
attempt to style filemanager control with new multi-column forms
1 parent 03b0723 commit 6bcca88

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

framework/core/forms/controls/bootstrap4/filemanagercontrol.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,14 @@ function toHTML($label,$name) {
4848
$assets_path = SCRIPT_RELATIVE.'framework/core/forms/controls/assets/';
4949
$subTypeName = empty($this->subtype) ? "expFile[]" : "expFile[".$this->subtype."][]";
5050
$files = $this->buildImages();
51-
$html = '<div id="filemanager'.$name.'" class="filemanager control form-group'.(empty($this->class)?"":" ".$this->class).'">';
51+
$class = empty($this->class) ? '' : $this->class;if ($this->horizontal)
52+
$class .= ' col-sm-10 ';
53+
elseif (empty($this->width)) {
54+
$class .= " col-sm-12";
55+
} else {
56+
$class .= " " . $this->width;
57+
}
58+
$html = '<div id="filemanager'.$name.'" class="filemanager control form-group'.(empty($class)?"":" ".$class).'">';
5259
//$html .= '<div id="displayfiles" class="displayfiles" style="padding:5px; border:1px solid #444"> </div>';
5360
$html .= '<div class="hd"><label class="control-label" id="sortfiles-'.$name.'" title="'.gt('Click to Sort List').'">'.$label;
5461
if ($this->limit!=null){

framework/core/forms/controls/bootstrap5/filemanagercontrol.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,14 @@ function toHTML($label,$name) {
4848
$assets_path = SCRIPT_RELATIVE.'framework/core/forms/controls/assets/';
4949
$subTypeName = empty($this->subtype) ? "expFile[]" : "expFile[".$this->subtype."][]";
5050
$files = $this->buildImages();
51-
$html = '<div id="filemanager'.$name.'" class="filemanager control form-group'.(empty($this->class)?"":" ".$this->class).'">';
51+
$class = empty($this->class) ? '' : $this->class;if ($this->horizontal)
52+
$class .= ' col-sm-10 ';
53+
elseif (empty($this->width)) {
54+
$class .= " col-sm-12";
55+
} else {
56+
$class .= " " . $this->width;
57+
}
58+
$html = '<div id="filemanager'.$name.'" class="filemanager control form-group'.(empty($class)?"":" ".$class).'">';
5259
//$html .= '<div id="displayfiles" class="displayfiles" style="padding:5px; border:1px solid #444"> </div>';
5360
$html .= '<div class="hd"><label class="form-label" id="sortfiles-'.$name.'" title="'.gt('Click to Sort List').'">'.$label;
5461
if ($this->limit!=null){

0 commit comments

Comments
 (0)