Issue #275 new

TbInput hint class cannot be configured

jfragoulis
created an issue

I am in a situation where I have an horizontal form and what I need is to display a small help link next to some fields, which I need to render inline and right next to the text/select input.

I tried using the hint htmlOption only to realize that it cannot be configured to use the help-inline class. It is hardcoded to use the help-block class.

I propose the following change to TnInput::getHint():

if (isset($htmlOptions['class']))
  $htmlOptions['class'] .= ' help-block';
else
  $htmlOptions['class'] = 'help-block';

to become

if (!isset($htmlOptions['class']))
  $htmlOptions['class'] = 'help-block';

or

$htmlOptions = $this->hintOptions;
if(isset($htmlOptions['inline']) {
  $class=$htmlOptions['inline']?'help-inline':'help-block';
  unset($htmlOptions['inline']);
} else {
  $class='help-block';
}

if (isset($htmlOptions['class']))
  $htmlOptions['class'] .= ' ' . $class;
else
  $htmlOptions['class'] = $class;

Comments (0)

  1. Log in to comment