AntonLV 8 лет назад
Родитель
Сommit
06d59ce7ee
2 измененных файлов с 17 добавлено и 2 удалено
  1. 11 1
      template/css/forms.css
  2. 6 1
      template/scripts/BxBaseFormView.php

+ 11 - 1
template/css/forms.css

@@ -340,10 +340,20 @@
 .bx-switcher-cont.off .bx-switcher-handler {
     background-color:#e7938a;
 }
+.bx-form-element-wrapper-oneline {
+	display: -webkit-flex;
+    display: flex;
+    -webkit-flex-flow: row nowrap;
+    flex-flow: row nowrap;
+    -webkit-align-items: flex-start;
+    align-items: flex-start;
+    -webkit-justify-content: flex-start;
+    justify-content: flex-start;
+}
 
 .bx-form-value-oneline,
 .bx-form-caption-oneline {
-    float:left;
+    float: none;
 }
 
 .bx-form-caption-oneline-switcher {

+ 6 - 1
template/scripts/BxBaseFormView.php

@@ -448,9 +448,14 @@ EOS;
 
         $sErrorIcon = $this->genErrorIcon(empty($aInput['error']) ? '' : $aInput['error']);
 
+        $sClassWrapper = 'bx-form-element-wrapper';
+        if($isOneLine)
+        	$sClassWrapper .= ' ' . $sClassWrapper . '-oneline';
+		$sClassWrapper .= ' bx-def-margin-top';
+
         if (isset($aInput['name']))
             $aInput['tr_attrs']['id'] = "bx-form-element-" . $aInput['name'];
-        $sTrAttrs = bx_convert_array2attrs(isset($aInput['tr_attrs']) && is_array($aInput['tr_attrs']) ? $aInput['tr_attrs'] : array(), "bx-form-element-wrapper bx-def-margin-top");
+        $sTrAttrs = bx_convert_array2attrs(isset($aInput['tr_attrs']) && is_array($aInput['tr_attrs']) ? $aInput['tr_attrs'] : array(), $sClassWrapper);
 
         $sClassOneLineCaption = '';
         $sClassOneLineValue = '';