commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-old / ctools / plugins / content_types / node_form / node_form_language.inc
1 <?php
2
3 /**
4 * Plugins are described by creating a $plugin array which will be used
5 * by the system that includes this file.
6 */
7 $plugin = array(
8 'single' => TRUE,
9 'icon' => 'icon_node_form.png',
10 'title' => t('Node form languages'),
11 'description' => t('The language selection form.'),
12 'required context' => new ctools_context_required(t('Form'), 'node_form'),
13 'category' => t('Form'),
14 );
15
16 function ctools_node_form_language_content_type_render($subtype, $conf, $panel_args, &$context) {
17 $block = new stdClass();
18 $block->module = t('node_form');
19
20 $block->delta = 'language-options';
21
22 if (isset($context->form)) {
23 if (!empty($context->form['language'])) {
24 $block->content['language'] = $context->form['language'];
25 unset($context->form['language']);
26 }
27 }
28 else {
29 $block->content = t('Node language form.');
30 }
31 return $block;
32 }
33
34 function ctools_node_form_language_content_type_admin_title($subtype, $conf, $context) {
35 return t('"@s" node form language field', array('@s' => $context->identifier));
36 }
37
38 function ctools_node_form_language_content_type_edit_form($form, &$form_state) {
39 // provide a blank form so we have a place to have context setting.
40 return $form;
41 }