summaryrefslogtreecommitdiff
path: root/settings.inc
diff options
context:
space:
mode:
authorprashantsinalkar2019-10-23 20:09:42 +0530
committerprashantsinalkar2019-10-23 20:10:06 +0530
commit1aaf5962cbdcc5a2ad97f01598ec7ce5f93aabcd (patch)
treeefa69ca44d825961ab06342a39801cbac3f95912 /settings.inc
parent8971fca1e7762b1d68ca0eba9290bd1fc47c7172 (diff)
downloadr_solr_search-1aaf5962cbdcc5a2ad97f01598ec7ce5f93aabcd.tar.gz
r_solr_search-1aaf5962cbdcc5a2ad97f01598ec7ce5f93aabcd.tar.bz2
r_solr_search-1aaf5962cbdcc5a2ad97f01598ec7ce5f93aabcd.zip
initial commit
Diffstat (limited to 'settings.inc')
-rwxr-xr-xsettings.inc34
1 files changed, 34 insertions, 0 deletions
diff --git a/settings.inc b/settings.inc
new file mode 100755
index 0000000..cd02e2c
--- /dev/null
+++ b/settings.inc
@@ -0,0 +1,34 @@
+<?php
+ function tbc_solr_search_settings_form($form_state) {
+
+ $form['tbc_example_file_path'] = array(
+ '#type' => 'textfield',
+ '#title' => t('TBC Example File Path'),
+ '#size' => 50,
+ '#required' => TRUE,
+ '#default_value' => variable_get('tbc_example_file_path', ''),
+ );
+
+ $form['tbc_solr_max_results'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Solr max results'),
+ '#size' => 50,
+ '#required' => TRUE,
+ '#default_value' => variable_get('tbc_solr_max_results', ''),
+ );
+
+ $form['submit'] = array(
+ '#type' => 'submit',
+ '#value' => t('Submit')
+ );
+
+ return $form;
+ }
+
+ function tbc_solr_search_settings_form_submit($form, &$form_state) {
+
+ variable_set('tbc_example_file_path', $form_state['values']['tbc_example_file_path']);
+ variable_set('tbc_solr_max_results', $form_state['values']['tbc_solr_max_results']);
+
+ drupal_set_message(t('Settings Updated Successfully!'), 'status');
+ }