Commit 6c6ea2ab authored by Sylvain's avatar Sylvain

Bt3 - Radio Inline

parent b38b9397
...@@ -474,7 +474,7 @@ class Field2Bt3 ...@@ -474,7 +474,7 @@ class Field2Bt3
$attr_selected = 'selected'; $attr_selected = 'selected';
break; break;
case 'checkbox': case 'checkbox':
$template = '<div class="checkbox[INLINE]">' . PHP_EOL; $template = '<div class="[INLINE]">' . PHP_EOL;
$template .= ' <label class="form-check-label" for="[ID]-[VALUE]">' . PHP_EOL; $template .= ' <label class="form-check-label" for="[ID]-[VALUE]">' . PHP_EOL;
$template .= ' <input id="[ID]-[VALUE]" name="[NAME]" value="[VALUE]"[ATTRIBUTES][SELECTED]/>' . PHP_EOL; $template .= ' <input id="[ID]-[VALUE]" name="[NAME]" value="[VALUE]"[ATTRIBUTES][SELECTED]/>' . PHP_EOL;
$template .= ' [LABEL]' . PHP_EOL; $template .= ' [LABEL]' . PHP_EOL;
...@@ -483,7 +483,7 @@ class Field2Bt3 ...@@ -483,7 +483,7 @@ class Field2Bt3
$sub_template = ''; $sub_template = '';
$attr_selected = 'checked'; $attr_selected = 'checked';
$template = str_replace('[INLINE]', ($this->inline ? ' form-check-inline' : ''), $template); $template = str_replace('[INLINE]', ($this->inline ? ' checkbox-inline' : 'checkbox'), $template);
$template = str_replace('[ID]', $this->makeID(), $template); $template = str_replace('[ID]', $this->makeID(), $template);
$template = str_replace('[NAME]', $this->makeName(), $template); $template = str_replace('[NAME]', $this->makeName(), $template);
...@@ -960,7 +960,7 @@ class Field2Bt3 ...@@ -960,7 +960,7 @@ class Field2Bt3
$templateInline = '<div class="form-group row">' . PHP_EOL; $templateInline = '<div class="form-group row">' . PHP_EOL;
$templateInline .= '%s%s'; $templateInline .= '%s%s';
$templateInline .= ' <div class="col-sm-10">' . PHP_EOL; $templateInline .= ' <div class="%s">' . PHP_EOL;
$templateInline .= '%s'; $templateInline .= '%s';
$templateInline .= ' </div>' . PHP_EOL; $templateInline .= ' </div>' . PHP_EOL;
$templateInline .= '</div>' . PHP_EOL; $templateInline .= '</div>' . PHP_EOL;
...@@ -1001,6 +1001,7 @@ class Field2Bt3 ...@@ -1001,6 +1001,7 @@ class Field2Bt3
$render = vsprintf($templateInline, [ $render = vsprintf($templateInline, [
str_indent($this->renderLabel(), 1), str_indent($this->renderLabel(), 1),
str_indent($this->renderPopover(), 1), str_indent($this->renderPopover(), 1),
empty($this->renderLabel()) ? 'col-sm-12' : 'col-sm-10',
$render, $render,
]); ]);
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment