You are here

function _sheetnode_phpexcel_settings in Sheetnode 7

Same name and namespace in other branches
  1. 5 modules/sheetnode_phpexcel/sheetnode_phpexcel.module \_sheetnode_phpexcel_settings()
  2. 6 modules/sheetnode_phpexcel/sheetnode_phpexcel.module \_sheetnode_phpexcel_settings()
  3. 7.2 modules/sheetnode_phpexcel/sheetnode_phpexcel.module \_sheetnode_phpexcel_settings()

Form function for admin/settings/sheetnode/phpexcel.

1 string reference to '_sheetnode_phpexcel_settings'
sheetnode_phpexcel_menu in modules/sheetnode_phpexcel/sheetnode_phpexcel.module
Implements hook_menu().

File

modules/sheetnode_phpexcel/sheetnode_phpexcel.module, line 268
Module file for the sheetnode_phpexcel module. This manages handling of files for sheetnode.

Code

function _sheetnode_phpexcel_settings($form, &$form_state) {
  $form['sheetnode_phpexcel_library_path'] = array(
    '#type' => 'textfield',
    '#title' => t('PHPExcel path'),
    '#description' => t('Enter the path of the extracted PHPExcel package. Full or relative paths should work.'),
    '#default_value' => variable_get('sheetnode_phpexcel_library_path', DEFAULT_SHEETNODE_PHPEXCEL_LIBRARY_PATH),
  );
  $form['sheetnode_phpexcel_export_links'] = array(
    '#type' => 'checkbox',
    '#title' => t('Display export links'),
    '#description' => t('Check this ON to display "Save as ..." links on every sheetnode page.'),
    '#default_value' => variable_get('sheetnode_phpexcel_export_links', TRUE),
  );
  $form['sheetnode_phpexcel_pdf_renderer_path'] = array(
    '#type' => 'textfield',
    '#title' => t('TCPDF path'),
    '#description' => t('Enter the path of the TCPDF rendering library. Full or relative paths should work.'),
    '#default_value' => variable_get('sheetnode_phpexcel_pdf_renderer_path', DEFAULT_SHEETNODE_PHPEXCEL_PDF_RENDERER_PATH),
  );
  $form['#validate'][] = '_sheetnode_phpexcel_settings_validate';
  return system_settings_form($form);
}