diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2012-11-27 12:13:33 +0100 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2012-11-27 12:13:33 +0100 |
commit | 60226a75d8e4a3ee9504da6eab6d8f329bb32e7b (patch) | |
tree | 4194c1f4b32fea06964029e9ce06bb18ccb05da6 /program/lib/Roundcube/rcube_utils.php | |
parent | 10da75f3645ff2121bbaf9d603f2e1465eddab78 (diff) |
Separate the very application-specific output classes from the Roundcube framework; add autoloader for rmail* classes
Diffstat (limited to 'program/lib/Roundcube/rcube_utils.php')
-rw-r--r-- | program/lib/Roundcube/rcube_utils.php | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/program/lib/Roundcube/rcube_utils.php b/program/lib/Roundcube/rcube_utils.php index df77dfe42..500f2c371 100644 --- a/program/lib/Roundcube/rcube_utils.php +++ b/program/lib/Roundcube/rcube_utils.php @@ -434,59 +434,6 @@ class rcube_utils /** - * Create an edit field for inclusion on a form - * - * @param string col field name - * @param string value field value - * @param array attrib HTML element attributes for field - * @param string type HTML element type (default 'text') - * - * @return string HTML field definition - */ - public static function get_edit_field($col, $value, $attrib, $type = 'text') - { - static $colcounts = array(); - - $fname = '_'.$col; - $attrib['name'] = $fname . ($attrib['array'] ? '[]' : ''); - $attrib['class'] = trim($attrib['class'] . ' ff_' . $col); - - if ($type == 'checkbox') { - $attrib['value'] = '1'; - $input = new html_checkbox($attrib); - } - else if ($type == 'textarea') { - $attrib['cols'] = $attrib['size']; - $input = new html_textarea($attrib); - } - else if ($type == 'select') { - $input = new html_select($attrib); - $input->add('---', ''); - $input->add(array_values($attrib['options']), array_keys($attrib['options'])); - } - else if ($attrib['type'] == 'password') { - $input = new html_passwordfield($attrib); - } - else { - if ($attrib['type'] != 'text' && $attrib['type'] != 'hidden') { - $attrib['type'] = 'text'; - } - $input = new html_inputfield($attrib); - } - - // use value from post - if (isset($_POST[$fname])) { - $postvalue = self::get_input_value($fname, self::INPUT_POST, true); - $value = $attrib['array'] ? $postvalue[intval($colcounts[$col]++)] : $postvalue; - } - - $out = $input->show($value); - - return $out; - } - - - /** * Replace all css definitions with #container [def] * and remove css-inlined scripting * |