diff --git a/include/class.forms.php b/include/class.forms.php index d472d3de32a913008ed256c4beb135bbdf7eae96..1d3d822e29a6dff967a804c2b80fff12e5dfdbff 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -3249,8 +3249,10 @@ class BoxChoicesWidget extends Widget { $this->value = $this->field->get('default'); $config = $this->field->getConfiguration(); $type = $config['multiple'] ? 'checkbox' : 'radio'; + + $classes = array('checkbox'); if (isset($config['classes'])) - $classes = 'class="'.$config['classes'].'"'; + $classes = array_merge($classes, (array) $config['classes']); foreach ($choices as $k => $v) { if (is_array($v)) { @@ -3260,17 +3262,16 @@ class BoxChoicesWidget extends Widget { } $id = sprintf("%s-%s", $this->id, $uid++); ?> - <label <?php echo $classes; ?> - for="<?php echo $id; ?>" style="display:block;"> - <input id="<?php echo $id; ?>" style="vertical-align:top;" - type="<?php echo $type; ?>" name="<?php echo $this->name; ?>[]" <?php + <label class="<?php echo implode(' ', $classes); ?>" + for="<?php echo $id; ?>"> + <input id="<?php echo $id; ?>" type="<?php echo $type; ?>" + name="<?php echo $this->name; ?>[]" <?php if ($this->value[$k]) echo 'checked="checked"'; ?> value="<?php echo Format::htmlchars($k); ?>"/> <?php - if ($v) { ?> - <em style="display:inline-block;vertical-align:baseline;width:90%;width:calc(100% - 25px);"><?php - echo Format::viewableImages($v); ?></em> -<?php } ?> + if ($v) { + echo Format::viewableImages($v); + } ?> </label> <?php } } @@ -3352,11 +3353,11 @@ class CheckboxWidget extends Widget { $config = $this->field->getConfiguration(); if (!isset($this->value)) $this->value = $this->field->get('default'); + $classes = array('checkbox'); if (isset($config['classes'])) - $classes = 'class="'.$config['classes'].'"'; + $classes = array_merge($classes, (array) $config['classes']); ?> - <div <?php echo implode(' ', array_filter(array($classes))); ?>> - <label class="checkbox"> + <label class="<?php echo implode(' ', $classes); ?>"> <input id="<?php echo $this->id; ?>" type="checkbox" name="<?php echo $this->name; ?>[]" <?php if ($this->value) echo 'checked="checked"'; ?> value="<?php @@ -3366,7 +3367,6 @@ class CheckboxWidget extends Widget { echo Format::viewableImages($config['desc']); } ?> </label> - </div> <?php } diff --git a/include/class.search.php b/include/class.search.php index f1de81937a80fabf39af510d1eea6bae7001f530..b0717c4775bef749464a93c3888b7069b6c08704 100644 --- a/include/class.search.php +++ b/include/class.search.php @@ -772,7 +772,8 @@ class SavedSearch extends VerySimpleModel { $pieces["{$name}+search"] = new BooleanField(array( 'id' => $baseId + 50000, 'configuration' => array( - 'desc' => $field->get('label'), + 'desc' => $field->getLocal('label'), + 'classes' => 'inline', ), )); $methods = $field->getSearchMethods(); diff --git a/include/class.staff.php b/include/class.staff.php index e1c8b146946b614c8dbb122ebe601901094be1f1..a40ea046ad140b8ee631e8085ce3e5c0333d3d3a 100644 --- a/include/class.staff.php +++ b/include/class.staff.php @@ -1182,7 +1182,6 @@ extends AbstractForm { 'widget' => 'TabbedBoxChoicesWidget', 'configuration' => array( 'multiple' => true, - 'classes' => 'vertical-pad', ), )), );