54 $document->filter =
new InclusionFilter(
"document_id",
"title",
"notes",
"keywords",
"file",
"author",
"publication_date",
"document_library_id",
"owner_id",
"allow_access");
56 $form =
new AutoForm(
$document,
"POST",
"/action/fileshare/upload?document_library_id=$document_library_id");
57 $form->ajaxSubmit(
"function(result) {uploadResult(result);}",
"function() {document.id('{$form->id}_error').set('text','Failed to communicate with server'); }");
58 $form->hide(
"publication_date",
"document_library_id",
"owner_id");
59 $form->required(
"title");
60 $form->validator->add(
new RequiredFileValidator(
"file",
"File",
"You must select a file to upload."));
61 $form->annotate(
"keywords",
"Separate keywords with a comma");
62 $form->getRenderer(
"title")->autocomplete =
false;
75 $_POST[
"publication_date"] = now();
89 echo
$form->writeScript();
This class maps the publication table.
The DocumentManager class provides the core API and management functions for uploading documents and ...
static usingFeature()
Uses the specified framework feature(s).
static using()
Import the datamodels, views and manifest for the specified component(s).
static end($message="")
Use this method to terminate execution of a script instead of using the php keywords exit() or die().
static addTaxonomyFieldRenderers($form, $showSelectAll=true, $group=null, $limitTo=null)
$method
Pull out a simple reference to the request method.
uploadLibraryFile($field, $document)
if(!checkRole($library->allow_access) &&! $library->allowAccess()) $document
if($folder_select) $fileUpload
if(! $document_library_id) global $library