Commit b38b9397 authored by Sylvain's avatar Sylvain

Bt3 - help block

parent 8a107947
......@@ -822,7 +822,7 @@ class Field2Bt3
$render = null;
if ($errors->has($this->makeGetterName())) {
$template = '<div class="invalid-feedback">%s</div>' . PHP_EOL;
$template = '<span class="help-block">%s</span>' . PHP_EOL;
$render = sprintf($template, $errors->first($this->makeGetterName()));
}
......@@ -840,7 +840,7 @@ class Field2Bt3
$render = '';
if (!empty($this->help)) {
$template = '<small class="form-text text-muted text-right mt-0">%s</small>' . PHP_EOL;
$template = '<small class="help-block text-muted text-right mt-0">%s</small>' . PHP_EOL;
$render = sprintf($template, $this->help);
}
......@@ -971,7 +971,7 @@ class Field2Bt3
$templateClassic .= '</div>' . PHP_EOL;
$templatePrefix = '<div class="input-group%s">'. PHP_EOL;
$templatePrefix .= '%s%s%s%s';
$templatePrefix .= '%s%s%s';
$templatePrefix .= '</div>'. PHP_EOL;
// Si prefixe ou suffixe
......@@ -985,14 +985,14 @@ class Field2Bt3
str_indent($this->renderPrefix(), 1),
str_indent($render, $noindent ? 0 : 1),
str_indent($this->renderSuffix(), 1),
$this->renderValidationMessage()
//$this->renderValidationMessage()
]);
$render .= $this->renderHelp();
} else {
$render .= $this->renderHelp() . $this->renderValidationMessage();
}
$render .= $this->renderHelp() . $this->renderValidationMessage();
// Affichage en mode inline
if ($this->inline && ($this->getAttr('type') != 'checkbox' || $this->getAttr('type') != 'radio')) {
......
......@@ -315,7 +315,7 @@ class FieldBt4
{
$availables = ['id', 'class', 'name', 'value', 'min', 'max', 'is_disabled', 'ris_equired', 'is_readonly', 'style'];
$functionName = camel_case($this->name) . 'ShowValue';
$functionName = Str::camel($this->name) . 'ShowValue';
$template = '<input type="range" %s oninput="%s(this.value)" />' . PHP_EOL;
$template .= '<span id="%s">%s&nbsp;</span>'. PHP_EOL;
$template .= '<script type="text/javascript">' . PHP_EOL;
......
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