You are here

function drupagram_account_list_form in Drupagram 7

Same name and namespace in other branches
  1. 6 drupagram.pages.inc \drupagram_account_list_form()

Account List form builder.

1 string reference to 'drupagram_account_list_form'
drupagram_user_settings in ./drupagram.pages.inc
@todo Please document this function.

File

./drupagram.pages.inc, line 73
Drupagram admin page callaback functions.

Code

function drupagram_account_list_form($form, $form_state, $drupagram_accounts = array()) {
  $form['#tree'] = TRUE;
  $form['accounts'] = array();
  foreach ($drupagram_accounts as $drupagram_account) {
    $form['accounts'][] = _drupagram_account_list_row($drupagram_account);
  }
  if (!empty($drupagram_accounts)) {
    $form['buttons']['submit'] = array(
      '#type' => 'submit',
      '#value' => t('Save changes'),
    );
  }
  return $form;
}