You are here

function context_ui_import in Context 6

Same name and namespace in other branches
  1. 5 context_ui/context_ui_admin.inc \context_ui_import()
  2. 6.2 context_ui/context_ui.admin.inc \context_ui_import()

Import form. Provides simple helptext instructions and textarea for pasting a context definition.

1 string reference to 'context_ui_import'
context_ui_import_page in context_ui/context_ui.admin.inc
Page callback for import form. Switches form output to context form if import submission has occurred.

File

context_ui/context_ui.admin.inc, line 470

Code

function context_ui_import() {
  drupal_set_title(t('Import context'));
  $help = t('You can import a context definition by pasting the exported context object code into the field below.');
  $form = array();
  $form['help'] = array(
    '#type' => 'item',
    '#value' => $help,
  );
  $form['import'] = array(
    '#title' => t('Context Object'),
    '#type' => 'textarea',
    '#rows' => 10,
    '#required' => true,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Import'),
  );
  return $form;
}