You are here

function cmis_content_create_form in CMIS API 6

CMIS content creation form builder.

1 string reference to 'cmis_content_create_form'
cmis_content_create in cmis_content/cmis_content.module
Implementation of CMIS content creation page. Allows user to create a text or html file and upload it to CMIS repository. Required input from user is the space path where the content will be stored. Optional inputs include content description, author etc.

File

cmis_content/cmis_content.module, line 96

Code

function cmis_content_create_form($form_state) {
  $parts = explode('/', $_GET['q']);
  $path = implode('/', array_slice($parts, 2));
  $form['#theme'] = 'cmis_content_create_form';
  $form['create']['path'] = array(
    '#type' => 'textfield',
    '#title' => t('Path'),
    '#default_value' => '/' . $path,
    '#autocomplete_path' => 'cmis/autocomplete',
    '#size' => 70,
  );
  $form['create']['name'] = array(
    '#type' => 'textfield',
    '#title' => t('Name'),
    '#size' => 70,
  );
  $form['create']['content'] = array(
    '#type' => 'textarea',
    '#title' => t('Content'),
  );
  $form['create']['submit'] = array(
    '#type' => 'submit',
    '#name' => 'browse',
    '#default_value' => 'Create',
  );
  return $form;
}