Fabrik/fabrik — Issue #195: Wrong conditions for icons in "validation_rule.php"?
Author: sperez15
Created: 2012-03-07 14:49:42+00:00
State: open

Hi.
Testing the icons that appear next to fields, I have found this line in the methods "getIcon()" and "getHoverText()":

(deprecated function but still existing)
`
public function getIcon($elementModel, $c = 0, $tmpl = '')
{
$name = $this->icon === true ? $this->_pluginName : $this->icon;
...
`
(new function)
`
public function getHoverText($elementModel, $c = 0, $tmpl = '')
{
$name = $this->icon === true ? $this->_pluginName : $this->icon;
...
`
The problem is: if I haven't got an icon for a validation rule (for instance, a "regular expression"), next to the field appears the icon "notempty.png". Actually, I don't want any icon for that rule...

Changing the previous line (== operator instead ===)

`
$name = $this->icon == true ? $this->_pluginName : $this->icon;
`

the code works as desired. If you don't have an icon for a rule, none icon appears next to the field.

Is it ok? Did I misunderstand something?

Thanks,
Santiago