Index: src/include/lib/Garradin/Template.php ================================================================== --- src/include/lib/Garradin/Template.php +++ src/include/lib/Garradin/Template.php @@ -37,11 +37,10 @@ } }); $this->register_function('form_errors', [$this, 'formErrors']); $this->register_function('show_error', [$this, 'showError']); - $this->register_function('form_select', [$this, 'formSelect']); $this->register_function('form_field', [$this, 'formField']); $this->register_function('select_compte', [$this, 'formSelectCompte']); $this->register_function('html_champ_membre', [$this, 'formChampMembre']); $this->register_function('custom_colors', [$this, 'customColors']); @@ -124,56 +123,10 @@ } return '
' . $this->escape($params['message']) . '
'; } - protected function formSelect(array $params) - { - if (empty($params['name'])) - { - throw new \BadFunctionCallException("Paramètre name manquant pour select"); - } - - $name = $params['name']; - $value = ''; - - if (f($name) !== null) - { - $value = f($name); - } - elseif (isset($params['data']) && is_array($params['data']) && isset($params['data'][$name])) - { - $value = $params['data'][$name]; - } - elseif (isset($params['data']) && is_object($params['data']) && isset($params['data']->$name)) - { - $value = $params['data']->$name; - } - elseif (isset($params['default'])) - { - $value = $params['default']; - } - - $out = sprintf(''; - return $out; - } - protected function formField(array $params) { if (!isset($params['name'])) { throw new \BadFunctionCallException('name argument is mandatory'); Index: src/templates/admin/compta/operations/saisir.tpl ================================================================== --- src/templates/admin/compta/operations/saisir.tpl +++ src/templates/admin/compta/operations/saisir.tpl @@ -29,13 +29,20 @@