You are here

function multiple_email_delete_form in Multiple E-mail Addresses 5

Same name and namespace in other branches
  1. 6 multiple_email_delete_page.inc \multiple_email_delete_form()
  2. 7 multiple_email_delete_page.inc \multiple_email_delete_form()
  3. 2.x multiple_email_delete_page.inc \multiple_email_delete_form()

Form displayed to confirm deletion of an email address from the registry

Parameters

object $email: Email object from the database

Return value

string

See also

multiple_email_delete_form_validate()

multiple_email_delete_form_submit()

1 string reference to 'multiple_email_delete_form'
multiple_email_delete_page in ./multiple_email_delete_page.inc
Shows confirmation that you want to delete the specified email address

File

./multiple_email_delete_page.inc, line 52
Contains functions the interface side of deleting an address

Code

function multiple_email_delete_form($email) {
  $form['eid'] = array(
    '#type' => 'hidden',
    '#value' => $email->eid,
  );
  $form[] = array(
    '#prefix' => '<p>',
    '#value' => t("Are you sure you wish to delete the address '%email' from your user account?", array(
      '%email' => $email->email,
    )),
    '#suffix' => '</p>',
  );
  $form['confirm'] = array(
    '#type' => 'submit',
    '#value' => 'Delete',
  );
  $url = base_path() . 'my-email-addresses';
  $form['cancel'] = array(
    '#type' => 'button',
    '#value' => 'Cancel',
    '#attributes' => array(
      'onclick' => "window.location='{$url}';return false;",
    ),
  );
  return $form;
}