diff options
author | Sashi20 | 2020-05-14 11:38:35 +0530 |
---|---|---|
committer | GitHub | 2020-05-14 11:38:35 +0530 |
commit | 04988c4f54bc95f7eb601d21f5e21f448b27028a (patch) | |
tree | 812fdaef4cbca0e27f6769ad22ece500ec7ad682 /settings.inc | |
parent | df2bce6785d0229eb3c03f8edc91d86008123bb2 (diff) | |
parent | 50cfdcba360dcb17f88c42ce3a51d09a9670ce65 (diff) | |
download | r_textbook_companion-04988c4f54bc95f7eb601d21f5e21f448b27028a.tar.gz r_textbook_companion-04988c4f54bc95f7eb601d21f5e21f448b27028a.tar.bz2 r_textbook_companion-04988c4f54bc95f7eb601d21f5e21f448b27028a.zip |
Merge pull request #35 from Sashi20/drupal_7.x
Add new field to upload file with codable examples to code submission interface
Diffstat (limited to 'settings.inc')
-rwxr-xr-x | settings.inc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/settings.inc b/settings.inc index 8ce3adb..f59c745 100755 --- a/settings.inc +++ b/settings.inc @@ -47,6 +47,15 @@ function textbook_companion_settings_form($form, &$form_state) '#required' => TRUE, '#default_value' => variable_get('textbook_companion_dataset_extensions', '') ); + $form['extensions']['codable_examples'] = array( + '#type' => 'textfield', + '#title' => t('Allowed file extensions to upload codable examples'), + '#description' => t('A comma separated list WITHOUT SPACE of source file extensions that are permitted to be uploaded on the server'), + '#size' => 50, + '#maxlength' => 255, + '#required' => TRUE, + '#default_value' => variable_get('textbook_companion_codable_examples_extensions', '') + ); $form['extensions']['sample_source'] = array( '#type' => 'textfield', '#title' => t('Allowed sample source file extensions'), @@ -86,6 +95,7 @@ function textbook_companion_settings_form_submit($form, &$form_state) variable_set('textbook_companion_from_email', $form_state['values']['from_email']); variable_set('textbook_companion_source_extensions', $form_state['values']['source']); variable_set('textbook_companion_dataset_extensions', $form_state['values']['dataset']); + variable_set('textbook_companion_codable_examples_extensions', $form_state['values']['codable_examples']); variable_set('textbook_companion_sample_source_extensions', $form_state['values']['sample_source']); variable_set('textbook_companion_book_preferences', $form_state['values']['book_preference_options']); drupal_set_message(t('Settings updated'), 'status'); |