$html = theme('mkdru_results');
drupal_add_js(array('mkdru' =>
array(
- 'settings' => variable_get('mkdru_ding'),
+ 'settings' => json_encode(variable_get('mkdru_ding', NULL)),
'pz2_path' => variable_get('pz2_path', '/pazpar2/search.pz2'),
'query' => $keys
)
// Config form common to node and settings
// function mkdru_settings_form($form, &$form_state) {
function mkdru_settings_form(&$form_state) {
-// dpm($form_state);
if (isset($form_state['values']['settings'])) {
$settings = $form_state['build_info']['args']['settings'];
}
return $form;
}
function mkdru_ding_settings_submit($form, &$form_state) {
- dpm($form_state);
variable_set('mkdru_ding', $form_state[values][settings]);
drupal_set_message(t('The configuration options have been saved.'));
}