| 318 |
); |
); |
| 319 |
} |
} |
| 320 |
|
|
| 321 |
$imports[t('Politicians')] = array( |
$imports[t('CSV')] = array( |
| 322 |
'legislature_import_politicians' => array( |
'legislature_import_politicians' => array( |
| 323 |
'title' => t('Politicians from CSV file'), |
'title' => t('Politicians'), |
| 324 |
'file path' => drupal_get_path('module', 'legislature') .'/imports/politicians.inc', |
'file path' => drupal_get_path('module', 'legislature') .'/imports/politicians.inc', |
| 325 |
'access' => user_access('run legislature imports'), |
'access' => user_access('run legislature imports'), |
| 326 |
), |
), |
| 327 |
|
'legislature_import_districts' => array( |
| 328 |
|
'title' => t('Districts'), |
| 329 |
|
'file path' => drupal_get_path('module', 'legislature') .'/imports/districts.inc', |
| 330 |
|
'access' => user_access('run legislature imports'), |
| 331 |
|
), |
| 332 |
); |
); |
| 333 |
|
|
| 334 |
return $imports; |
return $imports; |
| 378 |
$form['data']['file'] = array( |
$form['data']['file'] = array( |
| 379 |
'#type' => 'file', |
'#type' => 'file', |
| 380 |
'#value' => t('CSV file'), |
'#value' => t('CSV file'), |
| 381 |
'#description' => t('With columns politician_id, last_name, full_name, roster_name, phone, fax, email, party, gender, middle_name, nick_name, first_name, name_modifier'), |
'#description' => t('With columns politician_id, last_name, full_name, roster_name, phone, fax, email, party, gender, middle_name, nick_name, first_name, name_modifier.'), |
| 382 |
|
); |
| 383 |
|
break; |
| 384 |
|
|
| 385 |
|
case 'legislature_import_districts': |
| 386 |
|
$form['#attributes']['enctype'] = 'multipart/form-data'; |
| 387 |
|
$form['data']['file'] = array( |
| 388 |
|
'#type' => 'file', |
| 389 |
|
'#value' => t('CSV file'), |
| 390 |
|
'#description' => t('With columns jurisdiction, office, number, state, name_display.'), |
| 391 |
); |
); |
| 392 |
break; |
break; |
| 393 |
} |
} |