You are here

function sms_carriers_delete_form in SMS Framework 7

Same name and namespace in other branches
  1. 6.2 sms.admin.inc \sms_carriers_delete_form()

Form builder for the carrier deletion confirmation form.

Parameters

$carrier: An associative array defining the sms carrier.

See also

sms_carriers_delete_form_submit()

1 string reference to 'sms_carriers_delete_form'
sms_menu in ./sms.module
Implements hook_menu().

File

./sms.admin.inc, line 307
The admin sms functions.

Code

function sms_carriers_delete_form($form, &$form_state, $carrier) {
  $form['domain'] = array(
    '#type' => 'value',
    '#value' => $carrier['domain'],
  );
  $form['type'] = array(
    '#type' => 'value',
    '#value' => $carrier['type'],
  );
  if ($carrier['type'] == SMS_CARRIER_OVERRIDDEN) {
    return confirm_form($form, t('Are you sure you want revert %carrier?', array(
      '%carrier' => $carrier['name'],
    )), 'admin/smsframework/carriers', t('Reverting this carrier will delete it from the database. It will be replaced with the default carrier settings. This action cannot be undone.'), t('Revert'), t('Cancel'));
  }
  if ($carrier['type'] == SMS_CARRIER_NORMAL) {
    return confirm_form($form, t('Are you sure you want delete %carrier?', array(
      '%carrier' => $carrier['name'],
    )), 'admin/smsframework/carriers', t('This carrier will be removed from the database. This action cannot be undone.'), t('Delete'), t('Cancel'));
  }
}