Commit 430793f0d3593dd1bea17f1041f677c3493d90d9
1 parent
ff406c9a
added prelimart doctype managment
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1120 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
7 changed files
with
478 additions
and
0 deletions
presentation/lookAndFeel/knowledgeTree/administration/doctypemanagement/addDocTypeBL.php
0 โ 100644
| 1 | +<?php | |
| 2 | +/** | |
| 3 | +* BL information for adding a Org | |
| 4 | +* | |
| 5 | +* @author Mukhtar Dharsey | |
| 6 | +* @date 5 February 2003 | |
| 7 | +* @package presentation.lookAndFeel.knowledgeTree. | |
| 8 | +* | |
| 9 | +*/ | |
| 10 | +require_once("../../../../../config/dmsDefaults.php"); | |
| 11 | + | |
| 12 | +if (checkSession()) { | |
| 13 | + require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); | |
| 14 | + require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCreate.inc"); | |
| 15 | + require_once("addDocTypeUI.inc"); | |
| 16 | + require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentTypeFieldLink.inc"); | |
| 17 | + require_once("$default->fileSystemRoot/lib/security/permission.inc"); | |
| 18 | + require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | |
| 19 | + require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); | |
| 20 | + require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc"); | |
| 21 | + require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc"); | |
| 22 | + require_once("$default->fileSystemRoot/presentation/Html.inc"); | |
| 23 | + | |
| 24 | + $oPatternCustom = & new PatternCustom(); | |
| 25 | + $oPatternCustom->setHtml(getPage()); | |
| 26 | + $main->setCentralPayload($oPatternCustom); | |
| 27 | + $main->setFormAction("$default->rootUrl/presentation/lookAndFeel/knowledgeTree/create.php?fRedirectURL=".urlencode("$default->rootUrl/control.php?action=addDocTypeSuccess&fDocTypeID=")); | |
| 28 | + $main->render(); | |
| 29 | +} | |
| 30 | +?> | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/doctypemanagement/addDocTypeSuccess.php
0 โ 100644
| 1 | +<?php | |
| 2 | +/** | |
| 3 | +* Presentation information when adding a Org is successful | |
| 4 | +* | |
| 5 | +* @author Mukhtar Dharsey | |
| 6 | +* @date 5 February 2003 | |
| 7 | +* @package presentation.lookAndFeel.knowledgeTree. | |
| 8 | +* | |
| 9 | +*/ | |
| 10 | + | |
| 11 | +require_once("../../../../../config/dmsDefaults.php"); | |
| 12 | + | |
| 13 | +global $default; | |
| 14 | + | |
| 15 | +if(checkSession()) | |
| 16 | +{ | |
| 17 | + | |
| 18 | +// include the page template (with navbar) | |
| 19 | +require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | |
| 20 | + | |
| 21 | +$Center = "<br></br>\n" ; | |
| 22 | +$Center .= "<TABLE BORDER=\"0\" CELLSPACING=\"2\" CELLPADDING=\"2\">\n"; | |
| 23 | +$Center .= "<tr>\n"; | |
| 24 | +if($fDocTypeID == -1){ | |
| 25 | + $Center .= "<td><b>Document Type addition Unsuccessful!</b></td>\n"; | |
| 26 | + $Center .= "</tr>\n"; | |
| 27 | + $Center .= "<tr></tr>\n"; | |
| 28 | + $Center .= "<tr>\n"; | |
| 29 | + $Center .= "<td>Document Type already exists</td>\n"; | |
| 30 | + $Center .= "</tr>\n"; | |
| 31 | + | |
| 32 | +}else{ | |
| 33 | + $Center .= "<td><b>Document Type added Successfully!</b></td>\n"; | |
| 34 | + $Center .= "</tr>\n"; | |
| 35 | + | |
| 36 | +} | |
| 37 | + | |
| 38 | + | |
| 39 | +$Center .= "<tr></tr>\n"; | |
| 40 | +$Center .= "<tr></tr>\n"; | |
| 41 | +$Center .= "<tr></tr>\n"; | |
| 42 | +$Center .= "<tr></tr>\n"; | |
| 43 | +$Center .= "<tr>\n"; | |
| 44 | +$Center .= "<td align = right><a href=\"$default->rootUrl/control.php?action=addDocType\"><img src =\"$default->graphicsUrl/widgets/back.gif\" border = \"0\" /></a></td>\n"; | |
| 45 | +$Center .= "</tr>\n"; | |
| 46 | +$Center .= "</table>\n"; | |
| 47 | + | |
| 48 | + | |
| 49 | +$oPatternCustom = & new PatternCustom(); | |
| 50 | +$oPatternCustom->setHtml($Center); | |
| 51 | +$main->setCentralPayload($oPatternCustom); | |
| 52 | +$main->render(); | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | +} | |
| 58 | + | |
| 59 | +?> | |
| 0 | 60 | \ No newline at end of file | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/doctypemanagement/addDocTypeUI.inc
0 โ 100644
| 1 | +<?php | |
| 2 | +/** | |
| 3 | +* Presentation information for adding a Org | |
| 4 | +* | |
| 5 | +* @author Mukhtar Dharsey | |
| 6 | +* @date 5 February 2003 | |
| 7 | +* @package presentation.lookAndFeel.knowledgeTree. | |
| 8 | +* | |
| 9 | +*/ | |
| 10 | +// get add pages | |
| 11 | +function getPage() { | |
| 12 | + | |
| 13 | + global $default; | |
| 14 | + $aDisplayRowNames = array("Document Type Name:"); | |
| 15 | + $aParameterNumbers = array(0); | |
| 16 | + $aDisplayColumnTypes = array(1); | |
| 17 | + $aRequired = array(1); | |
| 18 | + //$aDropDownListTableNames = array(10=>"document_types_lookup"); | |
| 19 | + | |
| 20 | + // create a text field that is required | |
| 21 | + $oPatternCreate = & new PatternCreate("DocumentType", "documentmanagement/DocumentType.inc",$aDisplayRowNames, $aParameterNumbers, $aDisplayColumnTypes, $aRequired); | |
| 22 | + $oPatternCreate->setUniqueName("documentType"); | |
| 23 | + | |
| 24 | + $sToRender .= "<br></br>\n"; | |
| 25 | + $sToRender .= "<b>Add a New Document Type to the System:</b>\n"; | |
| 26 | + $sToRender .= "<table>\n"; | |
| 27 | + $sToRender .= "<br></br>\n"; | |
| 28 | + $sToRender .= "<tr></tr>\n"; | |
| 29 | + $sToRender .= "<tr>\n"; | |
| 30 | + $sToRender .= "<td>" . $oPatternCreate->render() . "</td>\n"; | |
| 31 | + $sToRender .= "</tr>\n"; | |
| 32 | + $sToRender .= "<tr>\n"; | |
| 33 | + $sToRender .= "</tr>\n"; | |
| 34 | + $sToRender .= "<tr>\n"; | |
| 35 | + $sToRender .= "</tr>\n"; | |
| 36 | + $sToRender .= "<td align = right><input type=\"image\" src =\"$default->graphicsUrl/widgets/add.gif\" value=\"submit\" /></td>\n"; | |
| 37 | + $sToRender .= "</table>\n"; | |
| 38 | + | |
| 39 | + return $sToRender; | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | +} | |
| 44 | +?> | |
| 0 | 45 | \ No newline at end of file | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/doctypemanagement/editDocTypeBL.php
0 โ 100644
| 1 | +<?php | |
| 2 | +/** | |
| 3 | +* BL information for editing a documentType | |
| 4 | +* | |
| 5 | +* @author Mukhtar Dharsey | |
| 6 | +* @date 5 February 2003 | |
| 7 | +* @package presentation.lookAndFeel.knowledgeTree. | |
| 8 | +* | |
| 9 | +*/ | |
| 10 | +require_once("../../../../../config/dmsDefaults.php"); | |
| 11 | + | |
| 12 | +if (checkSession()) { | |
| 13 | + require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); | |
| 14 | + require_once("$default->fileSystemRoot/lib/visualpatterns/PatternEditableListFromQuery.inc"); | |
| 15 | + require_once("editDocTypeUI.inc"); | |
| 16 | + require_once("$default->fileSystemRoot/lib/security/permission.inc"); | |
| 17 | + require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentType.inc"); | |
| 18 | + require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | |
| 19 | + require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); | |
| 20 | + require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc"); | |
| 21 | + require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc"); | |
| 22 | + require_once("$default->fileSystemRoot/presentation/Html.inc"); | |
| 23 | + | |
| 24 | + | |
| 25 | + $oPatternCustom = & new PatternCustom(); | |
| 26 | + | |
| 27 | + // if a new DocType has been added | |
| 28 | + // coming from manual edit page | |
| 29 | + if (isset($fForStore)) { | |
| 30 | + $oDocType = DocumentType::get($fDocTypeID); | |
| 31 | + $oDocType->setName($fDocTypeName); | |
| 32 | + | |
| 33 | + if ($oDocType->update()) { | |
| 34 | + // if successfull print out success message | |
| 35 | + $oPatternCustom->setHtml(getEditPageSuccess()); | |
| 36 | + | |
| 37 | + } else { | |
| 38 | + // if fail print out fail message | |
| 39 | + $oPatternCustom->setHtml(getEditPageFail()); | |
| 40 | + } | |
| 41 | + } else if (isset($fDocTypeID)){ | |
| 42 | + // post back on DocType select from manual edit page | |
| 43 | + $oPatternCustom->setHtml(getEditPage($fDocTypeID)); | |
| 44 | + $main->setFormAction($_SERVER["PHP_SELF"] . "?fForStore=1"); | |
| 45 | + | |
| 46 | + } else { | |
| 47 | + // if nothing happens...just reload edit page | |
| 48 | + $oPatternCustom->setHtml(getEditPage(null)); | |
| 49 | + $main->setFormAction($_SERVER["PHP_SELF"]); | |
| 50 | + | |
| 51 | + } | |
| 52 | + //render the page | |
| 53 | + $main->setCentralPayload($oPatternCustom); | |
| 54 | + $main->render(); | |
| 55 | +} | |
| 56 | +?> | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/doctypemanagement/editDocTypeUI.inc
0 โ 100644
| 1 | +<?php | |
| 2 | +/** | |
| 3 | +* Presentation information for renaming a DocType | |
| 4 | +* | |
| 5 | +* @author Mukhtar Dharsey | |
| 6 | +* @date 5 February 2003 | |
| 7 | +* @package presentation.lookAndFeel.knowledgeTree. | |
| 8 | +* | |
| 9 | +*/ | |
| 10 | + | |
| 11 | +// if its the manual edit page..then display normally | |
| 12 | +function getEditPage($iDocTypeID) { | |
| 13 | + global $default; | |
| 14 | + $oDocType = null; | |
| 15 | + if (isset($iDocTypeID)) { | |
| 16 | + $oDocType = DocumentType::get($iDocTypeID); | |
| 17 | + | |
| 18 | + } | |
| 19 | + | |
| 20 | + $sToRender .= "<br></br>\n"; | |
| 21 | + $sToRender .= "<b>Edit Document Type Properties:</b>\n"; | |
| 22 | + $sToRender .= "<table>\n"; | |
| 23 | + $sToRender .= "<br></br>\n"; | |
| 24 | + $sToRender .= "<tr></tr>\n"; | |
| 25 | + $sToRender .= "<tr>\n"; | |
| 26 | + $sToRender .= "<td>Document Type Name: </td><td>" . getDocTypeDisplay($oDocType) . "</td>\n"; | |
| 27 | + $sToRender .= "</tr>\n"; | |
| 28 | + $sToRender .= "<tr>\n"; | |
| 29 | + $sToRender .= "</tr>\n"; | |
| 30 | + $sToRender .= "<tr>\n"; | |
| 31 | + $sToRender .= "<tr>\n"; | |
| 32 | + $sToRender .= "</tr>\n"; | |
| 33 | + $sToRender .= "<td></td>" . getUpdateButton($oDocType); | |
| 34 | + $sToRender .= getCancelButton($oDocType); | |
| 35 | + $sToRender .= "</table>\n"; | |
| 36 | + | |
| 37 | + | |
| 38 | + return $sToRender; | |
| 39 | +} | |
| 40 | + | |
| 41 | +// if edition is successful print otu success page | |
| 42 | +function getEditPageSuccess() { | |
| 43 | + global $default; | |
| 44 | + | |
| 45 | + $sToRender .= "<br></br>\n"; | |
| 46 | + $sToRender .= "<b>Success!</b>\n"; | |
| 47 | + $sToRender .= "<table>\n"; | |
| 48 | + $sToRender .= "<br></br>\n"; | |
| 49 | + $sToRender .= "<tr></tr>\n"; | |
| 50 | + $sToRender .= "<tr><td>The Document Type was successfully modified</td></tr>\n"; | |
| 51 | + $sToRender .= "<tr></tr>\n"; | |
| 52 | + $sToRender .= "<tr></tr>\n"; | |
| 53 | + $sToRender .= "<tr>\n"; | |
| 54 | + $sToRender .= "<td></td><td align = right><a href=\"$default->rootUrl/control.php?action=editDocType\"><img src =\"$default->graphicsUrl/widgets/back.gif\" border = \"0\" /></a></td>\n"; | |
| 55 | + $sToRender .= "</tr>\n"; | |
| 56 | + $sToRender .= "</table>\n"; | |
| 57 | + | |
| 58 | + | |
| 59 | + return $sToRender; | |
| 60 | +} | |
| 61 | + | |
| 62 | + | |
| 63 | +// gets the page if edition fails | |
| 64 | +function getEditPageFail() { | |
| 65 | + global $default; | |
| 66 | + | |
| 67 | + $sToRender .= "<br></br>\n"; | |
| 68 | + $sToRender .= "<b>Success!</b>\n"; | |
| 69 | + $sToRender .= "<table>\n"; | |
| 70 | + $sToRender .= "<br></br>\n"; | |
| 71 | + $sToRender .= "<tr></tr>\n"; | |
| 72 | + $sToRender .= "<tr><td>Document Type modification Failed!</td></tr>\n"; | |
| 73 | + $sToRender .= "<tr></tr>\n"; | |
| 74 | + $sToRender .= "<tr></tr>\n"; | |
| 75 | + $sToRender .= "<tr>\n"; | |
| 76 | + $sToRender .= "<td></td><td align = right><a href=\"$default->rootUrl/control.php?action=editDocType\"><img src =\"$default->graphicsUrl/widgets/back.gif\" border = \"0\" /></a></td>\n"; | |
| 77 | + $sToRender .= "</tr>\n"; | |
| 78 | + $sToRender .= "</table>\n"; | |
| 79 | + | |
| 80 | + | |
| 81 | + return $sToRender; | |
| 82 | +} | |
| 83 | + | |
| 84 | +// show the list box when no DocType selected | |
| 85 | +// then shows a text box with the DocType's name | |
| 86 | +function getDocTypeDisplay($oDocType) { | |
| 87 | + global $default; | |
| 88 | + if (!isset($oDocType)) { | |
| 89 | + $oPatternListBox = & new PatternListBox($default->owl_document_types_table, "name", "id", "fDocTypeID"); | |
| 90 | + //$oPatternListBox->setIncludeDefaultValue(true); | |
| 91 | + $oPatternListBox->setPostBackOnChange(true); | |
| 92 | + return $oPatternListBox->render(); | |
| 93 | + } else { | |
| 94 | + return "<input type=\"hidden\" name=\"fDocTypeID\" value=\"" . $oDocType->iId . "\">\n" . | |
| 95 | + "<input size = \"40\" type=\"text\" name=\"fDocTypeName\" value=\"" . $oDocType->getName() . "\">"; | |
| 96 | + } | |
| 97 | + | |
| 98 | +} | |
| 99 | + | |
| 100 | + | |
| 101 | +// gets the updatebutton when a DocType is selected | |
| 102 | +function getUpdateButton($oDocType) { | |
| 103 | + global $default; | |
| 104 | + if (!isset($oDocType)) { | |
| 105 | + return "Please select a Document Type: "; | |
| 106 | + } else { | |
| 107 | + return "<td align = right><input type=\"image\" src =\"$default->graphicsUrl/widgets/update.gif\" value=\"submit\" /></td>\n"; | |
| 108 | + } | |
| 109 | +} | |
| 110 | + | |
| 111 | +// gets the cancel button when a DocType is selected | |
| 112 | +function getCancelButton($oDocType) { | |
| 113 | + global $default; | |
| 114 | + if (!isset($oDocType)) { | |
| 115 | + //return "<td align = right><a href=\"$default->rootUrl/control.php?action=groupManagement\"><img src =\"$default->graphicsUrl/widgets/cancel.gif\" value=\"cancel\" /></a></td>\n"; | |
| 116 | + } else { | |
| 117 | + return "<td align = right><a href=\"$default->rootUrl/control.php?action=editDocType\"><img src =\"$default->graphicsUrl/widgets/cancel.gif\" border = \"0\" /></a></td>\n"; | |
| 118 | + } | |
| 119 | +} | |
| 120 | +?> | |
| 0 | 121 | \ No newline at end of file | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/doctypemanagement/removeDocTypeBL.php
0 โ 100644
| 1 | +<?php | |
| 2 | +/** | |
| 3 | +* BL information for adding a DocType | |
| 4 | +* | |
| 5 | +* @author Mukhtar Dharsey | |
| 6 | +* @date 5 February 2003 | |
| 7 | +* @package presentation.lookAndFeel.knowledgeTree. | |
| 8 | +* | |
| 9 | +*/ | |
| 10 | +require_once("../../../../../config/dmsDefaults.php"); | |
| 11 | + | |
| 12 | +if (checkSession()) { | |
| 13 | + require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); | |
| 14 | + require_once("$default->fileSystemRoot/lib/visualpatterns/PatternEditableListFromQuery.inc"); | |
| 15 | + require_once("removeDocTypeUI.inc"); | |
| 16 | + require_once("$default->fileSystemRoot/lib/security/permission.inc"); | |
| 17 | + require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentType.inc"); | |
| 18 | + require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | |
| 19 | + require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); | |
| 20 | + require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc"); | |
| 21 | + require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc"); | |
| 22 | + require_once("$default->fileSystemRoot/presentation/Html.inc"); | |
| 23 | + | |
| 24 | + $oPatternCustom = & new PatternCustom(); | |
| 25 | + | |
| 26 | + // get main page | |
| 27 | + if (isset($fDocTypeID)) { | |
| 28 | + | |
| 29 | + $oPatternCustom->setHtml(getDeletePage($fDocTypeID)); | |
| 30 | + $main->setFormAction($_SERVER["PHP_SELF"] . "?fForDelete=1"); | |
| 31 | + | |
| 32 | + // get delete page | |
| 33 | + } else { | |
| 34 | + $oPatternCustom->setHtml(getDeletePage(null)); | |
| 35 | + $main->setFormAction($_SERVER["PHP_SELF"]); | |
| 36 | + } | |
| 37 | + | |
| 38 | + // if delete entry | |
| 39 | + if (isset($fForDelete)) { | |
| 40 | + $oDocType = DocumentType::get($fDocTypeID); | |
| 41 | + $oDocType->setName($fDocTypeName); | |
| 42 | + | |
| 43 | + if ($oDocType->delete()) { | |
| 44 | + $oPatternCustom->setHtml(getDeleteSuccessPage()); | |
| 45 | + | |
| 46 | + } else { | |
| 47 | + $oPatternCustom->setHtml(getDeleteFailPage()); | |
| 48 | + } | |
| 49 | + } | |
| 50 | + | |
| 51 | + $main->setCentralPayload($oPatternCustom); | |
| 52 | + $main->render(); | |
| 53 | +} | |
| 54 | +?> | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/doctypemanagement/removeDocTypeUI.inc
0 โ 100644
| 1 | +<?php | |
| 2 | + | |
| 3 | +/** | |
| 4 | +* Presentation information for Deleting a DocType | |
| 5 | +* | |
| 6 | +* @author Mukhtar Dharsey | |
| 7 | +* @date 5 February 2003 | |
| 8 | +* @package presentation.lookAndFeel.knowledgeTree. | |
| 9 | +* | |
| 10 | +*/ | |
| 11 | +// gets the delete stuff | |
| 12 | +function getDeletePage($iDocTypeID) { | |
| 13 | + global $default; | |
| 14 | + $oDocType = null; | |
| 15 | + if (isset($iDocTypeID)) { | |
| 16 | + $oDocType = DocumentType::get($iDocTypeID); | |
| 17 | + $sToRender .= "<br></br>\n"; | |
| 18 | + $sToRender .= "<b>Are you sure you wish to Remove this Document Type?:</b>\n"; | |
| 19 | + } | |
| 20 | + else{ | |
| 21 | + $sToRender .= "<br></br>\n"; | |
| 22 | + $sToRender .= "<b>Remove Document Type From System:</b>\n"; | |
| 23 | + } | |
| 24 | + | |
| 25 | + $sToRender .= "<table>\n"; | |
| 26 | + $sToRender .= "<br></br>\n"; | |
| 27 | + $sToRender .= "<tr></tr>\n"; | |
| 28 | + $sToRender .= "<tr>\n"; | |
| 29 | + $sToRender .= "<td>Document Type Name: " . getDocTypeDisplay($oDocType) . "</td>\n"; | |
| 30 | + $sToRender .= "</tr>\n"; | |
| 31 | + $sToRender .= "<tr>\n"; | |
| 32 | + $sToRender .= "</tr>\n"; | |
| 33 | + $sToRender .= "<tr>\n"; | |
| 34 | + $sToRender .= "</tr>\n"; | |
| 35 | + $sToRender .= "<tr>\n"; | |
| 36 | + $sToRender .= "</tr>\n"; | |
| 37 | + $sToRender .= "<tr>\n"; | |
| 38 | + $sToRender .= "</tr>\n"; | |
| 39 | + $sToRender .= getDeleteButton($oDocType); | |
| 40 | + $sToRender .= "</table>\n"; | |
| 41 | + | |
| 42 | + | |
| 43 | + return $sToRender; | |
| 44 | +} | |
| 45 | + | |
| 46 | +// get successfully deletion page | |
| 47 | +function getDeleteSuccessPage() { | |
| 48 | + | |
| 49 | +global $default; | |
| 50 | + | |
| 51 | +$sToRender = "<br></br>\n" ; | |
| 52 | +$sToRender .= "<TABLE BORDER=\"0\" CELLSPACING=\"2\" CELLPADDING=\"2\">\n"; | |
| 53 | +$sToRender .= "<tr>\n"; | |
| 54 | +$sToRender .= "<td><b>DocumentType SuccessFully Removed!</b></td>\n"; | |
| 55 | +$sToRender .= "</tr>\n"; | |
| 56 | +$sToRender .= "<tr></tr>\n"; | |
| 57 | +$sToRender .= "<tr></tr>\n"; | |
| 58 | +$sToRender .= "<tr></tr>\n"; | |
| 59 | +$sToRender .= "<tr></tr>\n"; | |
| 60 | +$sToRender .= "<tr>\n"; | |
| 61 | +$sToRender .= "<td align = right><a href=\"$default->rootUrl/control.php?action=removeDocType\"><img src =\"$default->graphicsUrl/widgets/back.gif\" border = \"0\" /></a></td>\n"; | |
| 62 | +$sToRender .= "</tr>\n"; | |
| 63 | +$sToRender .= "</table>\n"; | |
| 64 | + | |
| 65 | +return $sToRender; | |
| 66 | +} | |
| 67 | + | |
| 68 | +// get deletion failed page | |
| 69 | +function getDeleteFailPage() { | |
| 70 | + | |
| 71 | +global $default; | |
| 72 | + | |
| 73 | +$sToRender = "<br></br>\n" ; | |
| 74 | +$sToRender .= "<TABLE BORDER=\"0\" CELLSPACING=\"2\" CELLPADDING=\"2\">\n"; | |
| 75 | +$sToRender .= "<tr>\n"; | |
| 76 | +$sToRender .= "<td><b>Deletion Failed!</b></td>\n"; | |
| 77 | +$sToRender .= "</tr>\n"; | |
| 78 | +$sToRender .= "<tr></tr>\n"; | |
| 79 | +$sToRender .= "<tr></tr>\n"; | |
| 80 | +$sToRender .= "<tr><td>Please Ensure that the Document Type have been Removed from the Fields it Belongs to</td></tr>\n"; | |
| 81 | +$sToRender .= "<tr></tr>\n"; | |
| 82 | +$sToRender .= "</tr>\n"; | |
| 83 | +$sToRender .= "<tr><td align = right><a href=\"$default->rootUrl/control.php?action=removeDocType\"><img src =\"$default->graphicsUrl/widgets/back.gif\" border = \"0\" /></a></td></tr>\n"; | |
| 84 | +$sToRender .= "</table>\n"; | |
| 85 | + | |
| 86 | +return $sToRender; | |
| 87 | +} | |
| 88 | + | |
| 89 | +// show listbox...or the text name | |
| 90 | +function getDocTypeDisplay($oDocType) { | |
| 91 | + global $default; | |
| 92 | + if (!isset($oDocType)) { | |
| 93 | + $oPatternListBox = & new PatternListBox($default->owl_document_types_table, "name", "id", "fDocTypeID"); | |
| 94 | + $oPatternListBox->setIncludeDefaultValue(true); | |
| 95 | + $oPatternListBox->setPostBackOnChange(true); | |
| 96 | + return $oPatternListBox->render(); | |
| 97 | + } else { | |
| 98 | + return "<input type=\"hidden\" name=\"fDocTypeID\" value=\"" . $oDocType->iId . "\">\n" . | |
| 99 | + "<b>" . $oDocType->getName() . "</b>"; | |
| 100 | + } | |
| 101 | + | |
| 102 | +} | |
| 103 | + | |
| 104 | + | |
| 105 | +// show delete button | |
| 106 | +function getDeleteButton($oDocType) { | |
| 107 | + global $default; | |
| 108 | + if (!isset($oDocType)) { | |
| 109 | + return "Please select a Document Type: "; | |
| 110 | + } else { | |
| 111 | + return "<td align = right><input type=\"image\" src =\"$default->graphicsUrl/widgets/Delete.gif\" value=\"submit\" /></td>\n". | |
| 112 | + "<td align = right><a href=\"$default->rootUrl/control.php?action=removeDocType\"><img src =\"$default->graphicsUrl/widgets/Cancel.gif\" border = \"0\" /></a></td>\n"; | |
| 113 | + } | |
| 114 | +} | |
| 115 | +?> | ... | ... |