You are here

function _sheetnode_ethercalc_settings in Sheetnode 6

Same name and namespace in other branches
  1. 7.2 modules/sheetnode_ethercalc/sheetnode_ethercalc.module \_sheetnode_ethercalc_settings()
  2. 7 modules/sheetnode_ethercalc/sheetnode_ethercalc.module \_sheetnode_ethercalc_settings()

Form function for admin/settings/sheetnode/ethercalc.

1 string reference to '_sheetnode_ethercalc_settings'
sheetnode_ethercalc_menu in modules/sheetnode_ethercalc/sheetnode_ethercalc.module
Implementation of hook_menu().

File

modules/sheetnode_ethercalc/sheetnode_ethercalc.module, line 59

Code

function _sheetnode_ethercalc_settings(&$form_state) {
  $form['sheetnode_ethercalc_host'] = array(
    '#type' => 'textfield',
    '#title' => t('EtherCalc host'),
    '#description' => t('Enter the domain name of the EtherCalc server. Leave blank to use same domain as your Drupal installation.'),
    '#default_value' => variable_get('sheetnode_ethercalc_host', ''),
  );
  $form['sheetnode_ethercalc_port'] = array(
    '#type' => 'textfield',
    '#title' => t('EtherCalc port'),
    '#description' => t('Enter the port of the EtherCalc server.'),
    '#default_value' => variable_get('sheetnode_ethercalc_port', '8000'),
  );
  $form['sheetnode_ethercalc_mode'] = array(
    '#type' => 'radios',
    '#title' => t('Activate EtherCalc on'),
    '#options' => array(
      SHEETNODE_ETHERCALC_EDIT_ONLY => t('Edit mode only'),
      SHEETNODE_ETHERCALC_EDIT_FIDDLE => t('Edit and fiddle modes'),
    ),
    '#default_value' => variable_get('sheetnode_ethercalc_mode', SHEETNODE_ETHERCALC_EDIT_ONLY),
  );
  return system_settings_form($form);
}