function saml_sp__delete_idp_form in SAML Service Provider 7
Same name and namespace in other branches
- 7.8 saml_sp.admin.inc \saml_sp__delete_idp_form()
- 7.2 saml_sp.admin.inc \saml_sp__delete_idp_form()
- 7.3 saml_sp.admin.inc \saml_sp__delete_idp_form()
Confirmation form to delete an IDP.
1 string reference to 'saml_sp__delete_idp_form'
- saml_sp_menu in ./
saml_sp.module - Implements hook_menu().
File
- ./
saml_sp.admin.inc, line 154 - Admin pages for the SAML Service Provider module.
Code
function saml_sp__delete_idp_form($form, &$form_state, $saml_idp) {
$form['#destination'] = 'admin/config/people/saml_sp/IDP';
// Pass the name to the submit handler, to use in the message.
$form['name'] = array(
'#type' => 'value',
'#value' => $saml_idp->name,
);
// Pass the machine name to the handler, to use as the key for invoking
// the delete API.
$form['machine_name'] = array(
'#type' => 'value',
'#value' => $saml_idp->machine_name,
);
// Usage: confirm_form($form, $question, $path, $description = NULL, $yes = NULL, $no = NULL, $name = 'confirm')
$question = $saml_idp->export_type & EXPORT_IN_CODE ? t('Are you sure you wish revert the IDP %idp_name?', array(
'%idp_name' => $saml_idp->name,
)) : t('Are you sure you wish delete the IDP %idp_name?', array(
'%idp_name' => $saml_idp->name,
));
return confirm_form($form, $question, 'admin/config/people/saml_sp/IDP', t('This action cannot be undone.'), $saml_idp->export_type & EXPORT_IN_CODE ? t('Revert') : t('Delete'));
}