You are here

function apps_settings_form in Apps 7

Admin settings form for Apps.

1 string reference to 'apps_settings_form'
apps_menu in ./apps.module
Implements hook_menu().

File

./apps.pages.inc, line 452
The page callbacks for the Apps module.

Code

function apps_settings_form() {
  $form = array();
  $form['apps_offline_mode'] = array(
    '#title' => t('Apps Offline Mode'),
    '#description' => t('Does not try to make external requests to app servers. Assumes all apps are already locally stored.'),
    '#type' => 'checkbox',
    '#default_value' => variable_get('apps_offline_mode', FALSE),
  );
  $form['apps_enable_dev_console'] = array(
    '#title' => t('Enable Development Console'),
    '#description' => t('Allows local Apps to be displayed in a development app server.'),
    '#type' => 'checkbox',
    '#default_value' => variable_get('apps_enable_dev_console', FALSE),
  );
  $form['apps_allow_voting'] = array(
    '#title' => t('Allow Voting'),
    '#description' => t('Allow users who can install apps to also rate them.  Requires that the appserver is running the appserver module.'),
    '#type' => 'checkbox',
    '#default_value' => variable_get('apps_allow_voting', FALSE),
  );
  $form['apps_install_path'] = array(
    '#title' => t('Apps Install Path'),
    '#description' => t('For best practice, you can change the path to sites/all/modules/contrib.'),
    '#type' => 'textfield',
    '#default_value' => variable_get('apps_install_path', APPS_INSTALL_PATH),
  );
  $form['apps_grouping_mode'] = array(
    '#title' => t('Allow Apps Grouping'),
    '#description' => t('Allow grouping of Apps according to packages (as defined in app information via "package" key.)'),
    '#type' => 'checkbox',
    '#default_value' => variable_get('apps_grouping_mode', FALSE),
  );
  $form['apps_grouping_vertical'] = array(
    '#title' => t('Use vertical tabs for Apps Grouping'),
    '#description' => t('Put the groupings into vertical tabs instead of collapsible fieldsets.'),
    '#type' => 'checkbox',
    '#default_value' => variable_get('apps_grouping_vertical', TRUE),
  );
  $form = system_settings_form($form);
  $form['#submit'][] = 'apps_settings_form_submit';
  return $form;
}