function biblio_citeproc_style_manager_form_submit in Bibliography Module 7
Same name and namespace in other branches
- 6.2 modules/CiteProc/biblio_citeproc.admin.inc \biblio_citeproc_style_manager_form_submit()
- 7.2 modules/CiteProc/biblio_citeproc.admin.inc \biblio_citeproc_style_manager_form_submit()
File
- modules/
CiteProc/ biblio_citeproc.admin.inc, line 192
Code
function biblio_citeproc_style_manager_form_submit($form, &$form_state) {
if ($form_state['clicked_button']['#value'] == '<--' && count($form_state['values']['available_styles'])) {
if (!($style_zip_file = variable_get('biblio_citeproc_styles_zip_file', FALSE))) {
$style_zip_file = _get_zip_from_github();
}
if (!$style_zip_file) {
form_set_error('<--', t('Could not get the style files from GitHub'));
}
$file = drupal_realpath($style_zip_file->uri);
$selected = $form_state['values']['available_styles'];
_install_selected_from_zip($file, $selected);
}
if ($form_state['clicked_button']['#value'] == '-->' && count($form_state['values']['installed_styles'])) {
$selected = $form_state['values']['installed_styles'];
_uninstall_selected($selected);
}
}