From 4599df0e52096cca58056571ac88b045527a9eb9 Mon Sep 17 00:00:00 2001 From: Jakub Skoczen Date: Thu, 24 Feb 2011 12:42:53 +0100 Subject: [PATCH] Add SP setting to the module config --- mkdru.admin.inc | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/mkdru.admin.inc b/mkdru.admin.inc index ceaa676..085c7a5 100644 --- a/mkdru.admin.inc +++ b/mkdru.admin.inc @@ -13,6 +13,45 @@ function mkdru_admin_settings() { '#default_value' => variable_get('pz2_js_path', 'pazpar2/js'), '#required' => TRUE ); + $form['search_settings'] = array( + '#type' => 'fieldset', + '#title' => t('Pazpar2/Service Proxy search settings'), + '#collapsible' => TRUE, + '#collapsed' => FALSE + ); + $form['search_settings']['pz2_path'] = array( + '#type' => 'textfield', + '#title' => t('Pazpar2/Service Proxy path'), + '#description' => t('Path that takes Pazpar2 commands via HTTP'), + '#required' => TRUE, + '#default_value' => variable_get('pz2_path','/pazpar2/search.pz2') + ); + $form['search_settings']['use_sessions'] = array( + '#type' => 'checkbox', '#title' => t('Session handling'), + '#description' => t('Disable for use with Service Proxy'), + '#default_value' => variable_get('use_sessions', '1') + ); + + $form['sp_settings'] = array( + '#type' => 'fieldset', + '#title' => t('Service Proxy specific settings'), + '#collapsible' => TRUE, + '#collapsed' => FALSE + ); + $form['sp_settings']['sp_user'] = array( + '#type' => 'textfield', + '#title' => t('Service Proxy username'), + '#description' => t('Service Proxy username'), + '#required' => FALSE, + '#default_value' => variable_get('sp_user','') + ); + $form['sp_settings']['sp_pass'] = array( + '#type' => 'textfield', + '#title' => t('Service Proxy password'), + '#description' => t('Service Proxy password'), + '#required' => FALSE, + '#default_value' => variable_get('sp_pass','') + ); return system_settings_form($form); } -- 1.7.10.4