From ec25fa857b75572b264676a30e634e85e2e47766 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Mon, 15 Jan 2018 10:31:27 +0100 Subject: [PATCH] Improve layout of contact import form Move the file input to the .propform table. --- program/localization/en_US/labels.inc | 2 +- program/steps/addressbook/import.inc | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index 47580cbf0..e121d89e1 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -459,7 +459,7 @@ $labels['searchdelete'] = 'Delete search'; $labels['import'] = 'Import'; $labels['importcontacts'] = 'Import contacts'; -$labels['importfromfile'] = 'Import from file:'; +$labels['importfromfile'] = 'Import from file'; $labels['importtarget'] = 'Add contacts to'; $labels['importreplace'] = 'Replace the entire address book'; $labels['importgroups'] = 'Import group assignments'; diff --git a/program/steps/addressbook/import.inc b/program/steps/addressbook/import.inc index b1d4f6cb5..34928f795 100644 --- a/program/steps/addressbook/import.inc +++ b/program/steps/addressbook/import.inc @@ -204,15 +204,19 @@ function rcmail_import_form($attrib) $writable_books = $RCMAIL->get_address_sources(true, true); + $form = ''; + $table = new html_table(array('cols' => 2)); $upload = new html_inputfield(array( 'type' => 'file', 'name' => '_file[]', 'id' => 'rcmimportfile', 'size' => 40, 'multiple' => 'multiple', + 'class' => 'form-control-file', )); - $form = html::p(null, html::label('rcmimportfile', $RCMAIL->gettext('importfromfile')) . $upload->show()); - $table = new html_table(array('cols' => 2)); + + $table->add('title', html::label('rcmimportfile', $RCMAIL->gettext('importfromfile'))); + $table->add(null, $upload->show()); // addressbook selector if (count($writable_books) > 1) {