| | |
| | | | | |
| | | +-----------------------------------------------------------------------+ |
| | | | Author: Thomas Bruederli <roundcube@gmail.com> | |
| | | | Author: Aleksander Machniak <machniak@kolabsys.com> | |
| | | +-----------------------------------------------------------------------+ |
| | | |
| | | $Id: $ |
| | | $Id$ |
| | | |
| | | */ |
| | | |
| | |
| | | |
| | | $attrib += array('id' => "rcmImportForm"); |
| | | |
| | | $abook = new html_hiddenfield(array('name' => '_target', 'value' => $target)); |
| | | $form = $abook->show(); |
| | | $writable_books = $RCMAIL->get_address_sources(true); |
| | | |
| | | $upload = new html_inputfield(array('type' => 'file', 'name' => '_file', 'id' => 'rcmimportfile', 'size' => 40)); |
| | | $form .= html::p(null, html::label('rcmimportfile', rcube_label('importfromfile')) . html::br() . $upload->show()); |
| | | $form = html::p(null, html::label('rcmimportfile', rcube_label('importfromfile')) . $upload->show()); |
| | | |
| | | // addressbook selector |
| | | if (count($writable_books) > 1) { |
| | | $select = new html_select(array('name' => '_target', 'id' => 'rcmimporttarget')); |
| | | |
| | | foreach ($writable_books as $book) |
| | | $select->add($book['name'], $book['id']); |
| | | |
| | | $form .= html::p(null, html::label('rcmimporttarget', rcube_label('importtarget')) |
| | | . $select->show($target)); |
| | | } |
| | | else { |
| | | $abook = new html_hiddenfield(array('name' => '_target', 'value' => key($writable_books))); |
| | | $form .= $abook->show(); |
| | | } |
| | | |
| | | $check_replace = new html_checkbox(array('name' => '_replace', 'value' => 1, 'id' => 'rcmimportreplace')); |
| | | $form .= html::p(null, $check_replace->show(get_input_value('_replace', RCUBE_INPUT_GPC)) . |