Show the color dropdown when creating a new automatic action

Fixes #4443
This commit is contained in:
Slade
2020-04-29 19:33:21 -06:00
committed by GitHub
parent 7fb830518e
commit f397a81984
3 changed files with 18 additions and 5 deletions

View File

@@ -71,6 +71,22 @@ class FormHelper extends Base
return $html;
}
/**
* Display a color select field
*
* @access public
* @param string $name Field name
* @param array $values Form values
* @return string
*/
public function colorSelect($name, array $values)
{
$colors = $this->colorModel->getList();
$html = $this->label(t('Color'), $name);
$html .= $this->select($name, $colors, $values, array(), array('tabindex="4"'), 'color-picker');
return $html;
}
/**
* Display a radio field group
*