You are here

function tinybrowser_profile_delete_form in TinyBrowser 7

1 string reference to 'tinybrowser_profile_delete_form'
tinybrowser_profile_operations in ./tinybrowser.module
Add/Edit/Delete profile

File

./tinybrowser.module, line 941

Code

function tinybrowser_profile_delete_form($form, &$form_state, $pid) {
  if ($pid > 1 && ($profile = tinybrowser_load_profile($pid))) {
    $form['#submit'][] = 'tinybrowser_profile_delete_submit';
    $form['pid'] = array(
      '#type' => 'hidden',
      '#value' => $pid,
    );
    return confirm_form($form, t('Are you sure you want to delete the profile %name?', array(
      '%name' => $profile['name'],
    )), TB_CONFIG_PAGE, '', t('Delete'), t('Cancel'));
  }
  drupal_goto(TB_CONFIG_PAGE);
}