diff options
author | Prashant S | 2020-07-10 17:44:02 +0530 |
---|---|---|
committer | GitHub | 2020-07-10 17:44:02 +0530 |
commit | b32d1e5f99bebdde72b312c6d93d05dbf9e28558 (patch) | |
tree | 378818d3b5dd50d5a61a92262680b4a9cee3df21 /settings.inc | |
parent | 9f701719a2f93f7fa2fc5f9fc843454219009cc7 (diff) | |
parent | 2b3f23903b5a50482d797d88d5a0b73332aeaafb (diff) | |
download | scilab_solr_search-master.tar.gz scilab_solr_search-master.tar.bz2 scilab_solr_search-master.zip |
added and updated the code
Diffstat (limited to 'settings.inc')
-rwxr-xr-x | settings.inc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/settings.inc b/settings.inc new file mode 100755 index 0000000..a972abf --- /dev/null +++ b/settings.inc @@ -0,0 +1,34 @@ +<?php + function tbc_solr_search_settings_form($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'); + } |