-
-
- contentSubHeading(getMLText("document_infos")); ?>
- |
-
-
- : |
- |
-
-
- : |
- |
-
-
- : |
- printKeywordChooserHtml("form1");?> |
-
-
- : |
-
-
- |
-
-
- : |
- printSequenceChooser($folder->getDocuments('s')); if($orderby != 's') echo " ".getMLText('order_by_sequence_off'); ?> |
-
contentSubHeading(getMLText("document_infos"));
+ $this->formField(
+ getMLText("name"),
+ array(
+ 'element'=>'input',
+ 'type'=>'text',
+ 'id'=>'name',
+ 'name'=>'name',
+ 'required'=>true
+ )
+ );
+ $this->formField(
+ getMLText("comment"),
+ array(
+ 'element'=>'textarea',
+ 'name'=>'comment',
+ 'rows'=>4,
+ 'cols'=>80,
+ 'required'=>$strictformcheck
+ )
+ );
+ $this->formField(
+ getMLText("keywords"),
+ $this->getKeywordChooserHtml('form1')
+ );
+ $options = array();
+ $categories = $dms->getDocumentCategories();
+ foreach($categories as $category) {
+ $options[] = array($category->getID(), $category->getName());
+ }
+ $this->formField(
+ getMLText("categories"),
+ array(
+ 'element'=>'select',
+ 'class'=>'chzn-select',
+ 'name'=>'categories[]',
+ 'multiple'=>true,
+ 'attributes'=>array(array('data-placeholder', getMLText('select_category'), array('data-no_results_text', getMLText('unknown_document_category')))),
+ 'options'=>$options
+ )
+ );
+ $this->formField(getMLText("sequence"), $this->getSequenceChooser($folder->getDocuments('s')).($orderby != 's' ? "
".getMLText('order_by_sequence_off') : ''));
if($presetexpiration) {
if(!($expts = strtotime($presetexpiration)))
$expts = false;
} else {
$expts = false;
}
-?>
-
- : |
-
-
- |
-
- >
- : |
-
-
-
-
-
- |
-
-
-isAdmin()) { ?>
-
- : |
-
-
- |
-
-
-getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_document, SeedDMS_Core_AttributeDefinition::objtype_all));
- if($attrdefs) {
- foreach($attrdefs as $attrdef) {
- $arr = $this->callHook('addDocumentAttribute', null, $attrdef);
- if(is_array($arr)) {
- if($arr) {
- echo "";
- echo "".$arr[0].": | ";
- echo "".$arr[1]." | ";
- echo "
";
- }
- } else {
-?>
-
- getName()); ?> |
- printAttributeEditField($attrdef, '') ?> |
-
-formField(
+ getMLText("preset_expires"),
+ array(
+ 'element'=>'select',
+ 'id'=>'presetexpdate',
+ 'name'=>'presetexpdate',
+ 'options'=>$options
+ )
+ );
+ $this->formField(
+ getMLText("expires"),
+ $this->getDateChooser(($expts ? date('Y-m-d', $expts) : ''), "expdate", $this->params['session']->getLanguage())
+ );
+ if($user->isAdmin()) {
+ $options = array();
+ $allUsers = $dms->getAllUsers($sortusersinlist);
+ foreach ($allUsers as $currUser) {
+ if (!$currUser->isGuest())
+ $options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin()), ($currUser->getID()==$user->getID()), array(array('data-subtitle', htmlspecialchars($currUser->getFullName()))));
+ }
+ $this->formField(
+ getMLText("owner"),
+ array(
+ 'element'=>'select',
+ 'id'=>'ownerid',
+ 'name'=>'ownerid',
+ 'class'=>'chzn-select',
+ 'options'=>$options
+ )
+ );
+ }
+ $attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_document, SeedDMS_Core_AttributeDefinition::objtype_all));
+ if($attrdefs) {
+ foreach($attrdefs as $attrdef) {
+ $arr = $this->callHook('addDocumentAttribute', null, $attrdef);
+ if(is_array($arr)) {
+ if($arr) {
+ $this->formField($arr[0], $arr[1]);
}
+ } else {
+ $this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, ''));
}
}
- $arrs = $this->callHook('addDocumentAttributes', $folder);
- if(is_array($arrs)) {
- foreach($arrs as $arr) {
- echo "";
- echo "".$arr[0].": | ";
- echo "".$arr[1]." | ";
- echo "
";
- }
- }
-?>
-
-
- contentSubHeading(getMLText("version_info")); ?>
- |
-
-
- : |
- |
-
-
- : |
-
-printFineUploaderHtml();
- else {
- $this->printFileChooser('userfile[]', false);
- if($enablemultiupload) {
-?>
-
-
- |
-
-
-
- : |
- printDropFolderChooserHtml("form1", $dropfolderfile);?> |
-
-
-
- : |
-
- |
-
-getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_all));
- if($attrdefs) {
- foreach($attrdefs as $attrdef) {
- $arr = $this->callHook('addDocumentContentAttribute', null, $attrdef);
- if(is_array($arr)) {
- echo "";
- echo "".$arr[0].": | ";
- echo "".$arr[1]." | ";
- echo "
";
- } else {
-?>
-
- getName()); ?> |
- printAttributeEditField($attrdef, '', 'attributes_version') ?> |
-
-callHook('addDocumentAttributes', $folder);
+ if(is_array($arrs)) {
+ foreach($arrs as $arr) {
+ $this->formField($arr[0], $arr[1]);
}
+ }
- $arrs = $this->callHook('addDocumentContentAttributes', $folder);
- if(is_array($arrs)) {
- foreach($arrs as $arr) {
- echo "";
- echo "".$arr[0].": | ";
- echo "".$arr[1]." | ";
- echo "
";
+ $this->contentSubHeading(getMLText("version_info"));
+ $this->formField(
+ getMLText("version"),
+ array(
+ 'element'=>'input',
+ 'type'=>'text',
+ 'id'=>'reqversion',
+ 'name'=>'reqversion',
+ 'value'=>1
+ )
+ );
+ $this->formField(
+ getMLText("local_file"),
+ $enablelargefileupload ? $this->getFineUploaderHtml() : $this->printFileChooser('userfile[]', false).($enablemultiupload ? '' : '')
+ );
+ if($dropfolderdir) {
+ $this->formField(
+ getMLText("dropfolder_file"),
+ $this->getDropFolderChooserHtml("form1", $dropfolderfile)
+ );
+ }
+ $this->formField(
+ getMLText("comment_for_current_version"),
+ array(
+ 'element'=>'textarea',
+ 'name'=>'version_comment',
+ 'rows'=>4,
+ 'cols'=>80
+ )
+ );
+ $this->formField(
+ getMLText("use_comment_of_document"),
+ array(
+ 'element'=>'input',
+ 'type'=>'checkbox',
+ 'name'=>'use_comment',
+ 'value'=>1
+ )
+ );
+ $attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_all));
+ if($attrdefs) {
+ foreach($attrdefs as $attrdef) {
+ $arr = $this->callHook('addDocumentContentAttribute', null, $attrdef);
+ if(is_array($arr)) {
+ $this->formField($arr[0], $arr[1]);
+ } else {
+ $this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, '', 'attributes_version'));
}
}
+ }
+
+ $arrs = $this->callHook('addDocumentContentAttributes', $folder);
+ if(is_array($arrs)) {
+ foreach($arrs as $arr) {
+ $this->formField($arr[0], $arr[1]);
+ }
+ }
if($workflowmode == 'advanced') {
?>
-
-
:
- |
-
getMandatoryWorkflows();
if($mandatoryworkflows) {
if(count($mandatoryworkflows) == 1) {
-?>
- getName()); ?>
-
-formField(
+ getMLText("workflow"),
+ htmlspecialchars($mandatoryworkflows[0]->getName()).''
+ );
} else {
-?>
-
-getID(), htmlspecialchars($workflow->getName()));
+ }
+ $this->formField(
+ getMLText("owner"),
+ array(
+ 'element'=>'select',
+ 'id'=>'workflow',
+ 'name'=>'workflow',
+ 'class'=>'chzn-select-deselect',
+ 'attributes'=>array(array('data-placeholder', getMLText('select_workflow'))),
+ 'options'=>$options
+ )
+ );
}
} else {
-?>
-
-formField(
+ getMLText("owner"),
+ array(
+ 'element'=>'select',
+ 'id'=>'workflow',
+ 'name'=>'workflow',
+ 'class'=>'chzn-select-deselect',
+ 'attributes'=>array(array('data-placeholder', getMLText('select_workflow'))),
+ 'options'=>$options
+ )
+ );
}
-?>
- |
-
-
-
- warningMsg(getMLText("add_doc_workflow_warning")); ?>
- |
-
-warningMsg(getMLText("add_doc_workflow_warning"));
} else {
if($workflowmode == 'traditional') {
-?>
-
-
- contentSubHeading(getMLText("assign_reviewers")); ?>
- |
-
-
-
- :
- |
-
-getMandatoryReviewers();
-?>
-
-formField(
+ getMLText("individuals"),
+ array(
+ 'element'=>'select',
+ 'name'=>'indReviewers[]',
+ 'class'=>'chzn-select',
+ 'attributes'=>array(array('data-placeholder', getMLText('select_ind_reviewers'))),
+ 'multiple'=>true,
+ 'options'=>$options
+ )
+ );
+
/* List all mandatory reviewers */
if($res) {
$tmp = array();
@@ -479,27 +452,27 @@ $(document).ready(function() {
}
}
}
-?>
- |
-
-
-
- :
- |
-
-
-getID(), htmlspecialchars($grp->getName()), null);
+ if ($mandatory || !$grp->getUsers()) $option[] = array(array('disabled', 'disabled'));
+ $options[] = $option;
+ }
+ $this->formField(
+ getMLText("groups"),
+ array(
+ 'element'=>'select',
+ 'name'=>'grpReviewers[]',
+ 'class'=>'chzn-select',
+ 'attributes'=>array(array('data-placeholder', getMLText('select_grp_reviewers'))),
+ 'multiple'=>true,
+ 'options'=>$options
+ )
+ );
/* List all mandatory groups of reviewers */
if($res) {
$tmp = array();
@@ -529,23 +502,10 @@ $(document).ready(function() {
}
}
}
-?>
- |
-
-
-
-
- contentSubHeading(getMLText("assign_approvers")); ?>
- |
-
-
-
-
- :
- |
-
-
-formField(
+ getMLText("individuals"),
+ array(
+ 'element'=>'select',
+ 'name'=>'indApprovers[]',
+ 'class'=>'chzn-select',
+ 'attributes'=>array(array('data-placeholder', getMLText('select_ind_approvers'))),
+ 'multiple'=>true,
+ 'options'=>$options
+ )
+ );
+
/* List all mandatory approvers */
if($res) {
$tmp = array();
@@ -589,28 +559,28 @@ $(document).ready(function() {
}
}
}
-?>
- |
-
-
-
- :
- |
-
-
-formField(
+ getMLText("groups"),
+ array(
+ 'element'=>'select',
+ 'name'=>'grpApprovers[]',
+ 'class'=>'chzn-select',
+ 'attributes'=>array(array('data-placeholder', getMLText('select_grp_approvers'))),
+ 'multiple'=>true,
+ 'options'=>$options
+ )
+ );
/* List all mandatory groups of approvers */
if($res) {
$tmp = array();
@@ -642,57 +612,47 @@ $(document).ready(function() {
}
}
?>
- |
-
-
-
- |
-
-
-
- contentSubHeading(getMLText("add_document_notify")); ?>
- |
-
+ $this->contentSubHeading(getMLText("add_document_notify"));
-
-
- :
- |
-
-
- |
-
-
-
- :
- |
-
-
- |
-
-
-
-