function og_panels_context_group_settings_form in Organic groups 5
Same name and namespace in other branches
- 5.8 includes/groupcontext.inc \og_panels_context_group_settings_form()
- 5.3 includes/groupcontext.inc \og_panels_context_group_settings_form()
- 5.7 includes/groupcontext.inc \og_panels_context_group_settings_form()
- 6 includes/og.panelscontext.inc \og_panels_context_group_settings_form()
1 string reference to 'og_panels_context_group_settings_form'
- og_panels_panels_contexts in ./
og_panels.module - Implementation of hook_panels_contexts()
File
- includes/
groupcontext.inc, line 31 - contexts/group.inc
Code
function og_panels_context_group_settings_form($conf, $external = FALSE) {
if ($external) {
$form['external'] = array(
'#type' => 'checkbox',
'#default_value' => $conf['external'],
'#title' => t('Require this context from an external source (such as containing panel page).'),
'#description' => t('If selected, group selection (below) will be ignored'),
);
}
$form['node'] = array(
'#prefix' => '<div class="no-float">',
'#suffix' => '</div>',
'#title' => t('Enter the NID of a group'),
'#type' => 'textfield',
'#maxlength' => 512,
// '#autocomplete_path' => 'panels/node/autocomplete',
'#weight' => -10,
);
if (!empty($conf['nid'])) {
$info = db_fetch_object(db_query("SELECT * FROM {node} n WHERE n.nid = %d", $conf['nid']));
if ($info) {
$form['node']['#description'] = t('Currently set to "%title"', array(
'%title' => $info->title,
));
}
}
$form['nid'] = array(
'#type' => 'value',
'#value' => $conf['nid'],
);
return $form;
}