You are here

function workspace_configure_form in Workspace 6

Same name and namespace in other branches
  1. 5 workspace.module \workspace_configure_form()
  2. 7 workspace.module \workspace_configure_form()

Form definition for per-user configuration form.

1 string reference to 'workspace_configure_form'
workspace_configure in ./workspace.module
Menu callback. The configuration page.

File

./workspace.module, line 151
Presents a user-centric view of content.

Code

function workspace_configure_form($form_state, $account) {
  $form['maxnodes'] = array(
    '#type' => 'textfield',
    '#title' => t('Number of items'),
    '#description' => t('Maximum number of items to display in your workspace.'),
    '#default_value' => $account->workspaces ? $account->workspaces['default']['maxnodes'] : 50,
    '#size' => 4,
  );
  $form['maxfilenames'] = array(
    '#type' => 'textfield',
    '#title' => t('Number of files'),
    '#description' => t('Maximum number of filenames to display in your workspace.'),
    '#default_value' => $account->workspaces ? $account->workspaces['default']['maxfilenames'] : 50,
    '#size' => 4,
  );
  if (module_exists('comment')) {
    $form['maxcomments'] = array(
      '#type' => 'textfield',
      '#title' => t('Number of comments'),
      '#description' => t('Maximum number of comments to display in your workspace.'),
      '#default_value' => $account->workspaces['default']['maxcomments'] ? $account->workspaces['default']['maxcomments'] : 50,
      '#size' => 4,
    );
  }
  $form['uid'] = array(
    '#type' => 'value',
    '#value' => $account->uid,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save configuration'),
  );
  return $form;
}