Просмотр исходного кода

Ticket #4860 - Checkboxes in different controls.

AntonLV 1 год назад
Родитель
Сommit
069bca63c5

+ 1 - 1
modules/boonex/timeline/classes/BxTimelineTemplate.php

@@ -1356,7 +1356,7 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
 
                 $aTmplVarsModules[$sProfileModule]['bx_repeat:contexts'][] = array(
                     'style_prefix' => $sStylePrefix,
-                    'checkbox' => $oForm->genInput($aCheckbox),
+                    'checkbox' => $oForm->genInputCheckbox($aCheckbox, true),
                     'unit' => $oProfile->getUnit(0, array('template' => 'unit_wo_cover'))
                 );
             }

+ 7 - 0
template/scripts/BxBaseFormView.php

@@ -1473,6 +1473,13 @@ BLAH;
             'checkbox' => $sCheckbox
         ]);
     }
+    
+    function genInputCheckbox(&$aInput, $bWrapped = false)
+    {
+        $sInput = $this->genInputStandard($aInput);
+
+        return $bWrapped ? $this->genWrapperInput($aInput, $sInput) : $sInput;
+    }
 
     /**
      * Generate Button Input Element

+ 1 - 1
template/scripts/BxBaseLabel.php

@@ -256,7 +256,7 @@ class BxBaseLabel extends BxDolLabel
                 $bOpened = true;
 
             $aTmplVarsLabels[] = array(
-                'checkbox' => $oForm->genInput($aCheckbox),
+                'checkbox' => $oForm->genInputCheckbox($aCheckbox, true),
                 'html_id_label' => $sHtmlId,
                 'title' => $aLabel['value'],
                 'title_attr' => bx_html_attribute($aLabel['value']),

+ 1 - 1
template/scripts/BxBasePrivacyFormGroupCustom.php

@@ -193,7 +193,7 @@ class BxBasePrivacyFormGroupCustom extends BxTemplFormView
                 $aCheckbox['checked'] = in_array($iConnectedId, $aSelected) ? 1 : 0;
 
                 $aTmplVarsUsers[] = array(
-                    'checkbox' => $this->genInput($aCheckbox),
+                    'checkbox' => $this->genInputCheckbox($aCheckbox, true),
                     'unit' => $oProfile->getUnit()
                 );
             }