You are here

function drupagram_account_list_form in Drupagram 6

Same name and namespace in other branches
  1. 7 drupagram.pages.inc \drupagram_account_list_form()
1 string reference to 'drupagram_account_list_form'
drupagram_user_settings in ./drupagram.pages.inc

File

./drupagram.pages.inc, line 69
Provieds drupagram forms.

Code

function drupagram_account_list_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;
}