tweaks to import csv page

This commit is contained in:
Nathan Coad
2018-06-22 17:22:31 +10:00
parent 192032bab6
commit 1ab47f50b4
2 changed files with 7 additions and 2 deletions

View File

@@ -22,13 +22,17 @@ function booking_import_data_admin()
'#description' => t('Upload CSV data to be processed'),
);
$booking_view_fields = _booking_get_person_fields();
// Get the database fields and sort them alphabetically to make it easier to find
$booking_view_fields = _booking_get_person_fields();
sort($booking_view_fields, SORT_NATURAL | SORT_FLAG_CASE);
$form['booking_import_data_fields'] = array(
'#type' => 'select',
'#multiple' => TRUE,
'#title' => t('Select database fields for this import'),
'#description' => t('Select database fields to import from an uploaded CSV file. Ensure you hold down control/command when selecting multiple options.'),
'#options' => $booking_view_fields,
'#options' => $booking_view_fields,
'#size' => 10,
//'#default_value' => variable_get('booking_import_include_fields_dynamic', ''),
);

View File

@@ -910,6 +910,7 @@ function booking_schema() {
'booking_committee_member' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE, 'default' => 'N'),
'booking_welfare_required' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE, 'default' => 'N'),
'booking_barcode' => array('type' => 'varchar', 'length' => '20', 'not null' => FALSE),
'booking_qrcode_url' => array('type' => 'varchar', 'length' => '500', 'not null' => FALSE),
'booking_luckynum' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10', 'default' => 0),
'booking_readinggroup' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
'booking_shirt_size' => array('type' => 'varchar', 'length' => '20', 'not null' => FALSE),