function ldap_query_admin_enable_disable in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_query/ldap_query.admin.inc \ldap_query_admin_enable_disable()
- 7 ldap_query/ldap_query.admin.inc \ldap_query_admin_enable_disable()
Implements the LDAP query disable.
Parameters
$form_state: A form state array.
$qid: A LDAP query ID.
Return value
The form structure.
1 string reference to 'ldap_query_admin_enable_disable'
- ldap_query_menu in ldap_query/
ldap_query.module
File
- ldap_query/
ldap_query.admin.inc, line 185 - Defines functions for administrative interface for servers.
Code
function ldap_query_admin_enable_disable($form, &$form_state, $action = NULL, $qid = NULL) {
if ($ldap_query = ldap_query_get_queries($qid, 'all', TRUE)) {
$variables = [
'ldap_query' => $ldap_query,
'actions' => FALSE,
'type' => 'detail',
];
$form['#prefix'] = "<div>" . theme('ldap_query', $variables) . "</div>";
$form['qid'] = [
'#type' => 'hidden',
'#value' => $qid,
];
$form['name'] = [
'#type' => 'hidden',
'#value' => $ldap_query->name,
];
$form['action'] = [
'#type' => 'hidden',
'#value' => $action,
];
return confirm_form($form, t('Are you sure you want to') . t($action) . ' ' . t('the LDAP query named <em><strong>%name</strong></em>?', [
'%name' => $ldap_query->name,
]), LDAP_QUERY_MENU_BASE_PATH . '/query/list', t('<p></p>'), t($action), t('Cancel'));
}
}