diff --git a/presentation/lookAndFeel/knowledgeTree/foldermanagement/viewDependantDocumentsBL.php b/presentation/lookAndFeel/knowledgeTree/foldermanagement/viewDependantDocumentsBL.php
index 05cc88a..ad3a693 100644
--- a/presentation/lookAndFeel/knowledgeTree/foldermanagement/viewDependantDocumentsBL.php
+++ b/presentation/lookAndFeel/knowledgeTree/foldermanagement/viewDependantDocumentsBL.php
@@ -33,12 +33,12 @@ if (checkSession()) {
if (Permission::userHasFolderWritePermission($fFolderID)) {
//user has folder write permission
- if (isset($fForStore)) {
+ if (isset($fForStore)) {
$oDependantDocumentTemplate;
- if ($fTemplateDocumentID == "-1") {
+ if ($fTargetDocumentID == "-1") {
$oDependantDocumentTemplate = & new DependantDocumentTemplate($fDocumentTitle, $fUserID, $fFolderCollaborationID);
} else {
- $oDependantDocumentTemplate = & new DependantDocumentTemplate($fDocumentTitle, $fUserID, $fFolderCollaborationID, $fTemplateDocumentID);
+ $oDependantDocumentTemplate = & new DependantDocumentTemplate($fDocumentTitle, $fUserID, $fFolderCollaborationID, $fTargetDocumentID);
}
if (!($oDependantDocumentTemplate->create())) {
include_once("$default->fileSystemRoot/presentation/webpageTemplate.inc");
@@ -69,7 +69,7 @@ if (checkSession()) {
include_once("$default->fileSystemRoot/presentation/webpageTemplate.inc");
$oPatternCustom = & new PatternCustom();
- $oPatternCustom->setHtml(getAddPage($fFolderCollaborationID, $fFolderID, (isset($fUnitID) ? $fUnitID : -1), (isset($fDocumentTitle) ? $fDocumentTitle : ""), (isset($fTemplateDocument) ? $fTemplateDocument : ""), (isset($fDocumentID) ? $fDocumentID : "") ));
+ $oPatternCustom->setHtml(getAddPage($fFolderCollaborationID, $fFolderID, (isset($fUnitID) ? $fUnitID : -1), (isset($fDocumentTitle) ? $fDocumentTitle : ""), (isset($fDocument) ? $fDocument : ""), (isset($fTargetDocumentID) ? $fTargetDocumentID : "") ));
$main->setCentralPayload($oPatternCustom);
$main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID&fFolderCollaborationID=$fFolderCollaborationID&fForStore=1");
$main->setHasRequiredFields(true);
@@ -107,7 +107,7 @@ if (checkSession()) {
$oDependantDocumentTemplate = DependantDocumentTemplate::get($fDependantDocumentTemplateID);
$oDependantDocumentTemplate->setDefaultUserID($fUserID);
$oDependantDocumentTemplate->setDocumentTitle($fDocumentTitle);
- $oDependantDocumentTemplate->setTemplateDocumentID((isset($fTemplateDocumentID) ? $fTemplateDocumentID : null));
+ $oDependantDocumentTemplate->setTemplateDocumentID((isset($fTargetDocumentID) ? $fDocument : null));
$oDependantDocumentTemplate->update();
redirect("$default->rootUrl/control.php?action=viewDependantDocument&fFolderID=$fFolderID&fFolderCollaborationID=$fFolderCollaborationID");
diff --git a/presentation/lookAndFeel/knowledgeTree/foldermanagement/viewDependantDocumentsUI.inc b/presentation/lookAndFeel/knowledgeTree/foldermanagement/viewDependantDocumentsUI.inc
index ef5c5f9..ee38bf8 100644
--- a/presentation/lookAndFeel/knowledgeTree/foldermanagement/viewDependantDocumentsUI.inc
+++ b/presentation/lookAndFeel/knowledgeTree/foldermanagement/viewDependantDocumentsUI.inc
@@ -35,7 +35,7 @@ function getDocumentLinkFolderCollaborationData($iFolderCollaborationID) {
$aColumnTypes = array(1,1,3,3,3);
//$aDBColumnArray = array("id","group_folder_approval_link_id","template_document_id");
$aDBColumnArray = array("id","group_folder_approval_link_id","folder_id");
- //$aQueryStringVariableNames = array("fDependantDocumentTemplateID", "fFolderCollaborationID", "fDocumentID");
+ //$aQueryStringVariableNames = array("fDependantDocumentTemplateID", "fFolderCollaborationID", "fTargetDocumentID");
$aQueryStringVariableNames = array("fDependantDocumentTemplateID","fFolderCollaborationID","fFolderID");
$aLinkURLs = array(2=>"$default->rootUrl/control.php?action=viewDocument", 3=>"$default->rootUrl/control.php?action=viewDependantDocument&fForEdit=1", 4=>"$default->rootUrl/control.php?action=deleteDependantDocument");
@@ -88,10 +88,10 @@ function getEditPage($iFolderID, $iDependantDocumentID, $iFolderCollaborationID,
$bAddNetscapeScript = false;
if (! (($default->phpSniff->property("browser") == "moz") && ($default->phpSniff->property("version") <= "4.79")) ) {
//for any other browser but netscape 4.7 do this
- $sToRender .= "
Template document | | \n";
+ $sToRender .= "Template document | | \n";
}else {
//for netscape 4.7 do this
- $sToRender .= "Template document | | \n";
+ $sToRender .= "Template document | | \n";
$bAddNetscapeScript = true;
}
$sToRender .= "\n";
@@ -99,7 +99,7 @@ function getEditPage($iFolderID, $iDependantDocumentID, $iFolderCollaborationID,
$sToRender .= "\n";
$sToRender .= "\n";
$sToRender .= "\n";
- $sToRender .= "\n";
+ $sToRender .= "\n";
return $sToRender . "\n\n" . getValidationJavaScript() . "\n\n" . getBrowseJavaScript() . ($bAddNetscapeScript ? getNetscapeDisableScript() : "");
}
@@ -126,10 +126,12 @@ function getAddPage($iFolderCollaborationID, $iFolderID, $iUnitID, $sDocumentTit
$bAddNetscapeScript = false;
if (! (($default->phpSniff->property("browser") == "moz") && ($default->phpSniff->property("version") <= "4.79")) ) {
//for any other browser but netscape 4.7 do this
- $sToRender .= " | Template document | | \n";
+ //$sToRender .= "Template document | | \n";
+ $sToRender .= "Template document | rootUrl/control.php?action=templateBrowse','window2')\"> | \n";
}else {
//for netscape 4.7 do this
- $sToRender .= "Template document | | \n";
+ //$sToRender .= "Template document | | \n";
+ $sToRender .= "Template document | rootUrl/control.php?action=templateBrowse','window2')\"> | \n";
$bAddNetscapeScript = true;
}
$sToRender .= "\n";
@@ -137,7 +139,7 @@ function getAddPage($iFolderCollaborationID, $iFolderID, $iUnitID, $sDocumentTit
$sToRender .= "\n";
$sToRender .= "\n";
$sToRender .= "\n";
- $sToRender .= "\n";
+ $sToRender .= "\n";
return $sToRender . "\n\n" . getValidationJavaScript() . "\n\n" . getBrowseJavaScript() . ($bAddNetscapeScript ? getNetscapeDisableScript() : "");
}
|