summaryrefslogtreecommitdiff
path: root/settings.inc
diff options
context:
space:
mode:
authorSashi202020-05-08 20:48:18 +0530
committerSashi202020-05-08 20:48:18 +0530
commit1ab7069f68d636c1f83ff2e7f1d241500c6c70f8 (patch)
treeaedfebdca8a51b10160ee83724b351b4fbb18e1b /settings.inc
parentdebeceffff221fce157ef827d3166a334a6d4268 (diff)
downloadr_textbook_companion-1ab7069f68d636c1f83ff2e7f1d241500c6c70f8.tar.gz
r_textbook_companion-1ab7069f68d636c1f83ff2e7f1d241500c6c70f8.tar.bz2
r_textbook_companion-1ab7069f68d636c1f83ff2e7f1d241500c6c70f8.zip
Add new field to upload file with codable examples in code upload interface
Diffstat (limited to 'settings.inc')
-rwxr-xr-xsettings.inc10
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');