diff --git a/clean.sh b/clean.sh index 3f4e92232a..3b619f8c14 100755 --- a/clean.sh +++ b/clean.sh @@ -10,6 +10,6 @@ sed -i -e 's/> //g' \ -e 's///g' \ -e 's//?>/g' \ + -e 's/;?\s*?>/?>/g' \ -e 's/_name; } - public function setHelp($help) + public function setHelp($help, array $params = array()) { $this->_help = $help; + $this->_helpParams = $params; return $this; } @@ -119,7 +121,16 @@ class Form_Input extends Form_Element $this->_attributes['class'] = $this->getHtmlClass(false); $input = $this->_getInput(); - $help = isset($this->_help) ? ''. gettext($this->_help). '' : ''; + + if (isset($this->_help)) + { + $help = gettext($this->_help); + + if (!empty($this->_helpParams)) + $help = call_user_func_array('sprintf', array_merge([$help], $this->_helpParams)); + + $help = ''. $help .''; + } return <<getColumnHtmlClass()}> diff --git a/usr/local/www/classes/Form/Select.class.php b/usr/local/www/classes/Form/Select.class.php index b37f5d8f5a..5dba867d69 100644 --- a/usr/local/www/classes/Form/Select.class.php +++ b/usr/local/www/classes/Form/Select.class.php @@ -27,7 +27,7 @@ class Form_Select extends Form_Input $options = ''; foreach ($this->_values as $value => $name) - $options .= ''; + $options .= ''; return <<