Commit 591f9dce0d4acdad38b05df2ae4d55cfcde8ec89
1 parent
386dc22a
removed old administration pages
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2585 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
4 changed files
with
0 additions
and
505 deletions
presentation/lookAndFeel/knowledgeTree/administration/doctypefieldmanagement/assignDocTypeToFieldBL.php deleted
| 1 | -<?php | ||
| 2 | -/** | ||
| 3 | -* BL information for adding a group | ||
| 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("assignDocTypeToFieldUI.inc"); | ||
| 16 | - require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentField.inc"); | ||
| 17 | - require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentType.inc"); | ||
| 18 | - require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentTypeFieldLink.inc"); | ||
| 19 | - require_once("$default->fileSystemRoot/lib/security/permission.inc"); | ||
| 20 | - require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | ||
| 21 | - require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); | ||
| 22 | - require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc"); | ||
| 23 | - require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc"); | ||
| 24 | - require_once("$default->fileSystemRoot/presentation/Html.inc"); | ||
| 25 | - | ||
| 26 | - $oPatternCustom = & new PatternCustom(); | ||
| 27 | - | ||
| 28 | - if(!isset($fDocTypeSet)) { | ||
| 29 | - // build first page | ||
| 30 | - $oPatternCustom->setHtml(getPage(null,null)); | ||
| 31 | - $main->setFormAction($_SERVER["PHP_SELF"] . "?fDocTypeSet=1"); | ||
| 32 | - } else { | ||
| 33 | - // do a check to see both drop downs selected | ||
| 34 | - if($fDocTypeID == -1 Or $fDocTypeID == -1) { | ||
| 35 | - $oPatternCustom->setHtml(getPageNotSelected()); | ||
| 36 | - } else { //check if it belongs to a unit | ||
| 37 | - $oPatternCustom->setHtml(getPage($fDocTypeID,$fDocFieldID)); | ||
| 38 | - $main->setFormAction($_SERVER["PHP_SELF"] . "?fDocTypeSet=1&fDocTypeAssign=1"); | ||
| 39 | - } | ||
| 40 | - } | ||
| 41 | - | ||
| 42 | - if (isset($fDocTypeAssign)) { | ||
| 43 | - | ||
| 44 | - | ||
| 45 | - // else add to db and then goto page succes | ||
| 46 | - $oDocTypeField = new DocumentTypeFieldLink($fDocTypeID,$fDocFieldID, $fbIsMandatory); | ||
| 47 | - | ||
| 48 | - //check if checkbox checked | ||
| 49 | - if (isset($fbIsMandatory)) { | ||
| 50 | - $oDocTypeField->setIsMandatory(true); | ||
| 51 | - } else { | ||
| 52 | - $oDocTypeField->setIsMandatory(false); | ||
| 53 | - } | ||
| 54 | - | ||
| 55 | - if($oDocTypeField->create()) { | ||
| 56 | - $oPatternCustom->setHtml(getPageSuccess()); | ||
| 57 | - } else { | ||
| 58 | - $oPatternCustom->setHtml(getPageFail()); | ||
| 59 | - } | ||
| 60 | - } | ||
| 61 | - | ||
| 62 | - // render page | ||
| 63 | - $main->setCentralPayload($oPatternCustom); | ||
| 64 | - $main->render(); | ||
| 65 | -} | ||
| 66 | -?> |
presentation/lookAndFeel/knowledgeTree/administration/doctypefieldmanagement/assignDocTypeToFieldUI.inc deleted
| 1 | -<?php | ||
| 2 | -/** | ||
| 3 | -* Presentation information for adding a DocType | ||
| 4 | -* | ||
| 5 | -* @author Mukhtar Dharsey | ||
| 6 | -* @date 5 February 2003 | ||
| 7 | -* @package presentation.lookAndFeel.knowledgeTree. | ||
| 8 | -* | ||
| 9 | -*/ | ||
| 10 | - | ||
| 11 | -// gets main page | ||
| 12 | -function getPage($iDocTypeID, $iDocFieldID) { | ||
| 13 | - global $default; | ||
| 14 | - $oDocType = null; | ||
| 15 | - $oDocField = null; | ||
| 16 | - | ||
| 17 | - if (isset($iDocTypeID)) { | ||
| 18 | - $oDocType = DocumentType::get($iDocTypeID); | ||
| 19 | - $heading = "<tr>Are you Sure you wish to assign the Document Field to the Document Type? </tr>\n"; | ||
| 20 | - } else { | ||
| 21 | - $heading = "<tr>Please Assign a Document Field to a Document Type: </tr>\n"; | ||
| 22 | - } | ||
| 23 | - | ||
| 24 | - if (isset($iDocFieldID)) { | ||
| 25 | - $oDocField = DocumentField::get($iDocFieldID); | ||
| 26 | - } | ||
| 27 | - | ||
| 28 | - $sToRender .= renderHeading("Assign Document Field to Document Type"); | ||
| 29 | - $sToRender .= "<table>\n"; | ||
| 30 | - $sToRender .= $heading; | ||
| 31 | - $sToRender .= "<tr>\n"; | ||
| 32 | - $sToRender .= "</tr>\n"; | ||
| 33 | - $sToRender .= "<td>Document Type Name: </td><td>" . getDocTypeDisplay($oDocType) . "</td>\n"; | ||
| 34 | - $sToRender .= "<tr>\n"; | ||
| 35 | - $sToRender .= "</tr>\n"; | ||
| 36 | - $sToRender .= "<tr>\n"; | ||
| 37 | - $sToRender .= "<td>Document Field Name: </td><td>" . getDocFieldDisplay($oDocField) . "</td>\n"; | ||
| 38 | - $sToRender .= "</tr>\n"; | ||
| 39 | - $sToRender .= "<tr>\n"; | ||
| 40 | - $sToRender .= getIsMandatoryCheckBox($oDocField) . "</td>\n"; | ||
| 41 | - $sToRender .= "</tr>\n"; | ||
| 42 | - $sToRender .= "<tr>\n"; | ||
| 43 | - $sToRender .= "</tr>\n"; | ||
| 44 | - $sToRender .= "<td></td><td>" . getAssignButton($oDocType); | ||
| 45 | - $sToRender .= getCancelButton($oDocType); | ||
| 46 | - $sToRender .= "</td></table>\n"; | ||
| 47 | - | ||
| 48 | - return $sToRender; | ||
| 49 | -} | ||
| 50 | - | ||
| 51 | - | ||
| 52 | -// page that comes up when there is nothing selected | ||
| 53 | -function getPageNotSelected() { | ||
| 54 | - global $default; | ||
| 55 | - | ||
| 56 | - $sToRender .= renderHeading("Assign Document Field to Document Type"); | ||
| 57 | - $sToRender .= "<table>\n"; | ||
| 58 | - $sToRender .= "<tr><td><b>Sorry, Selection Failed</b></td></tr>\n"; | ||
| 59 | - $sToRender .= "<tr><td>Please select BOTH a Document Type AND a Document Field</td></tr>\n"; | ||
| 60 | - $sToRender .= "<tr></tr>\n"; | ||
| 61 | - $sToRender .= "<tr></tr>\n"; | ||
| 62 | - $sToRender .= "<tr>\n"; | ||
| 63 | - $sToRender .= "<td></td><td align = right><a href=\"$default->rootUrl/control.php?action=assignDocTypeToField\"><img src =\"$default->graphicsUrl/widgets/back.gif\" border = \"0\" /></a></td>\n"; | ||
| 64 | - $sToRender .= "</tr>\n"; | ||
| 65 | - $sToRender .= "</table>\n"; | ||
| 66 | - | ||
| 67 | - | ||
| 68 | - return $sToRender; | ||
| 69 | -} | ||
| 70 | - | ||
| 71 | -//if edition successful | ||
| 72 | -function getPageSuccess() { | ||
| 73 | - global $default; | ||
| 74 | - | ||
| 75 | - $sToRender .= renderHeading("Assign Document Field to Document Type"); | ||
| 76 | - $sToRender .= "<table>\n"; | ||
| 77 | - $sToRender .= "<tr><td><b>Success!</b></td></tr>\n"; | ||
| 78 | - $sToRender .= "<tr><td>The Document Field was successfully assigned to the specified Document Type</td></tr>\n"; | ||
| 79 | - $sToRender .= "<tr></tr>\n"; | ||
| 80 | - $sToRender .= "<tr></tr>\n"; | ||
| 81 | - $sToRender .= "<tr>\n"; | ||
| 82 | - $sToRender .= "<td></td><td align = right><a href=\"$default->rootUrl/control.php?action=assignDocTypeToField\"><img src =\"$default->graphicsUrl/widgets/back.gif\" border = \"0\" /></a></td>\n"; | ||
| 83 | - $sToRender .= "</tr>\n"; | ||
| 84 | - $sToRender .= "</table>\n"; | ||
| 85 | - | ||
| 86 | - | ||
| 87 | - return $sToRender; | ||
| 88 | -} | ||
| 89 | - | ||
| 90 | -//if edition successful | ||
| 91 | -function getPageFail() { | ||
| 92 | - global $default; | ||
| 93 | - | ||
| 94 | - $sToRender .= renderHeading("Assign Document Field to Document Type"); | ||
| 95 | - $sToRender .= "<table>\n"; | ||
| 96 | - $sToRender .= "<tr><td><b>Failure!</b></td></tr>\n"; | ||
| 97 | - $sToRender .= "<tr><td>The Document Field already belongs to that Document Type</td></tr>\n"; | ||
| 98 | - $sToRender .= "<tr></tr>\n"; | ||
| 99 | - $sToRender .= "<tr></tr>\n"; | ||
| 100 | - $sToRender .= "<tr>\n"; | ||
| 101 | - $sToRender .= "<td></td><td align = right><a href=\"$default->rootUrl/control.php?action=assignDocTypeToField\"><img src =\"$default->graphicsUrl/widgets/back.gif\" border = \"0\" /></a></td>\n"; | ||
| 102 | - $sToRender .= "</tr>\n"; | ||
| 103 | - $sToRender .= "</table>\n"; | ||
| 104 | - | ||
| 105 | - | ||
| 106 | - return $sToRender; | ||
| 107 | -} | ||
| 108 | - | ||
| 109 | -// display the listbox initially ..then just display the text | ||
| 110 | -function getDocTypeDisplay($oDocType) { | ||
| 111 | - global $default; | ||
| 112 | - if (!isset($oDocType)) { | ||
| 113 | - $oPatternListBox = & new PatternListBox($default->owl_document_types_table, "name", "id", "fDocTypeID"); | ||
| 114 | - | ||
| 115 | - return $oPatternListBox->render(); | ||
| 116 | - } else { | ||
| 117 | - return "<input type=\"hidden\" name=\"fDocTypeID\" value=\"" . $oDocType->iId . "\">\n" . | ||
| 118 | - $oDocType->getName(); | ||
| 119 | - } | ||
| 120 | - | ||
| 121 | -} | ||
| 122 | - | ||
| 123 | -// display the listbox initially ..then just display the text | ||
| 124 | -function getDocFieldDisplay($oDocField) { | ||
| 125 | - global $default; | ||
| 126 | - if (!isset($oDocField)) { | ||
| 127 | - $oPatternListBox = & new PatternListBox($default->owl_fields_table, "name", "id", "fDocFieldID"); | ||
| 128 | - //$oPatternLiListBoxstBox->setPostBackOnChange(true); | ||
| 129 | - return $oPatternListBox->render(); | ||
| 130 | - } else { | ||
| 131 | - return "<input type=\"hidden\" name=\"fDocFieldID\" value=\"" . $oDocField->iId . "\">\n" . | ||
| 132 | - $oDocField->getName(); | ||
| 133 | - } | ||
| 134 | - | ||
| 135 | -} | ||
| 136 | - | ||
| 137 | -// returns the checkbox ticked or unticked | ||
| 138 | -function getIsMandatoryCheckBox($oDocField) { | ||
| 139 | - if (!isset($oDocField)) { | ||
| 140 | - return ""; | ||
| 141 | - } else { | ||
| 142 | - return "<td>Is it Mandatory?: </td><td> <input type=\"checkbox\" name=\"fbIsMandatory\">"; | ||
| 143 | - } | ||
| 144 | -} | ||
| 145 | - | ||
| 146 | - | ||
| 147 | -// show button after DocType selected | ||
| 148 | -function getAssignButton($oDocType) { | ||
| 149 | - global $default; | ||
| 150 | - if (!isset($oDocType)) { | ||
| 151 | - return "<td align = right><input type=\"image\" src =\"$default->graphicsUrl/widgets/select.gif\" value=\"submit\" border=\"0\"/></td>\n"; | ||
| 152 | - } else { | ||
| 153 | - return "<td align = right><input type=\"image\" src =\"$default->graphicsUrl/widgets/assign.gif\" value=\"submit\" border=\"0\"/></td>\n"; | ||
| 154 | - } | ||
| 155 | -} | ||
| 156 | -// show button after DocType selected | ||
| 157 | -function getCancelButton($oDocType) { | ||
| 158 | - global $default; | ||
| 159 | - if (!isset($oDocType)) { | ||
| 160 | - return "<td align = right><a href=\"$default->rootUrl/control.php?action=doctypeManagement\"><img src =\"$default->graphicsUrl/widgets/cancel.gif\" value=\"cancel\" border = \"0\"/></a></td>\n"; | ||
| 161 | - } | ||
| 162 | - else { | ||
| 163 | - return "<td align = right><a href=\"$default->rootUrl/control.php?action=assignDocTypeToField\"><img src =\"$default->graphicsUrl/widgets/cancel.gif\" border = \"0\" /></a></td>\n"; | ||
| 164 | - } | ||
| 165 | -} | ||
| 166 | - | ||
| 167 | - | ||
| 168 | -?> | ||
| 169 | \ No newline at end of file | 0 | \ No newline at end of file |
presentation/lookAndFeel/knowledgeTree/administration/doctypefieldmanagement/removeDocTypeFromFieldBL.php deleted
| 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/PatternCreate.inc"); | ||
| 15 | - require_once("removeDocTypeFromFieldUI.inc"); | ||
| 16 | - require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentType.inc"); | ||
| 17 | - require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentField.inc"); | ||
| 18 | - require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentTypeFieldLink.inc"); | ||
| 19 | - require_once("$default->fileSystemRoot/lib/security/permission.inc"); | ||
| 20 | - require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | ||
| 21 | - require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); | ||
| 22 | - require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc"); | ||
| 23 | - require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc"); | ||
| 24 | - require_once("$default->fileSystemRoot/presentation/Html.inc"); | ||
| 25 | - | ||
| 26 | - | ||
| 27 | - $oPatternCustom = & new PatternCustom(); | ||
| 28 | - | ||
| 29 | - if(!isset($fDocTypeSet)){ | ||
| 30 | - // build first page | ||
| 31 | - | ||
| 32 | - $oPatternCustom->setHtml(getPage(null,null)); | ||
| 33 | - $main->setFormAction($_SERVER["PHP_SELF"] . "?fDocTypeSet=1"); | ||
| 34 | - | ||
| 35 | - }else{ | ||
| 36 | - // do a check to see both drop downs selected | ||
| 37 | - if($fDocTypeID == -1){ | ||
| 38 | - $oPatternCustom->setHtml(getPageNotSelected()); | ||
| 39 | - | ||
| 40 | - }else{ $fDocFieldID = DocumentTypeFieldLink::docTypeBelongsToField($fDocTypeID); | ||
| 41 | - $oPatternCustom->setHtml(getPage($fDocTypeID,$fDocFieldID)); | ||
| 42 | - $main->setFormAction($_SERVER["PHP_SELF"] . "?fDocTypeSet=1&fDeleteConfirmed=1"); | ||
| 43 | - } | ||
| 44 | - | ||
| 45 | - } | ||
| 46 | - | ||
| 47 | - | ||
| 48 | - if (isset($fDeleteConfirmed)){ | ||
| 49 | - | ||
| 50 | - // else add to db and then goto page succes | ||
| 51 | - $oDocTypeField = new DocumentTypeFieldLink($fDocTypeID,$fDocFieldID, $fbIsMandatory); | ||
| 52 | - | ||
| 53 | - //check if checkbox checked | ||
| 54 | - if (isset($fbIsMandatory)) { | ||
| 55 | - $oDocTypeField->setIsMandatory(true); | ||
| 56 | - } else { | ||
| 57 | - $oDocTypeField->setIsMandatory(false); | ||
| 58 | - } | ||
| 59 | - | ||
| 60 | - | ||
| 61 | - $oDocTypeField->setDocTypeFieldID($fDocTypeID); | ||
| 62 | - $oDocTypeField->delete(); | ||
| 63 | - $oPatternCustom->setHtml(getPageSuccess()); | ||
| 64 | - | ||
| 65 | - } | ||
| 66 | - | ||
| 67 | - // render page | ||
| 68 | - $main->setCentralPayload($oPatternCustom); | ||
| 69 | - $main->render(); | ||
| 70 | - | ||
| 71 | -} | ||
| 72 | -?> |
presentation/lookAndFeel/knowledgeTree/administration/doctypefieldmanagement/removeDocTypeFromFieldUI.inc deleted
| 1 | -<?php | ||
| 2 | -/** | ||
| 3 | -* Presentation information for adding a DocType | ||
| 4 | -* | ||
| 5 | -* @author Mukhtar Dharsey | ||
| 6 | -* @date 5 February 2003 | ||
| 7 | -* @package presentation.lookAndFeel.knowledgeTree. | ||
| 8 | -* | ||
| 9 | -*/ | ||
| 10 | - | ||
| 11 | -// get page for removal | ||
| 12 | -function getPage($iDocTypeID, $iDocFieldID) { | ||
| 13 | - global $default; | ||
| 14 | - $oDocType = null; | ||
| 15 | - $oDocField = null; | ||
| 16 | - | ||
| 17 | - // change headings if DocType selected | ||
| 18 | - if (isset($iDocTypeID)) { | ||
| 19 | - $oDocType = DocumentType::get($iDocTypeID); | ||
| 20 | - $heading = "<td>Are you sure you wish to remove the Document Type from the Document Field?</tr>\n"; | ||
| 21 | - }else{ | ||
| 22 | - $heading = "<tr>Please select a Document Type: </tr>\n"; | ||
| 23 | - } | ||
| 24 | - | ||
| 25 | - // when DocFieldid is gotten show the name | ||
| 26 | - if (isset($iDocFieldID)) { | ||
| 27 | - $oDocField = DocumentField::get($iDocFieldID); | ||
| 28 | - $DocFielddisplay = "<td>Document Field Name: " . getDocFieldDisplay($oDocField) . "</td>\n"; | ||
| 29 | - | ||
| 30 | - } | ||
| 31 | - else{ | ||
| 32 | - $DocFielddisplay = ""; | ||
| 33 | - } | ||
| 34 | - | ||
| 35 | - $sToRender .= "<br></br>\n"; | ||
| 36 | - $sToRender .= "<b>Select a Document Type to Remove from its Document Field:</b>\n"; | ||
| 37 | - $sToRender .= "<table>\n"; | ||
| 38 | - $sToRender .= "<br></br>\n"; | ||
| 39 | - $sToRender .= $heading; | ||
| 40 | - $sToRender .= "<br>\n"; | ||
| 41 | - $sToRender .= "<tr>\n"; | ||
| 42 | - $sToRender .= "</tr>\n"; | ||
| 43 | - $sToRender .= "<td>DocType Name: " . getDocTypeDisplay($oDocType) . "</td>\n"; | ||
| 44 | - $sToRender .= "<tr>\n"; | ||
| 45 | - $sToRender .= "</tr>\n"; | ||
| 46 | - $sToRender .= "<tr>\n"; | ||
| 47 | - $sToRender .= $DocFielddisplay; | ||
| 48 | - $sToRender .= "</tr>\n"; | ||
| 49 | - $sToRender .= "<tr>\n"; | ||
| 50 | - $sToRender .= getIsMandatoryCheckBox($oDocField) . "</td>\n"; | ||
| 51 | - $sToRender .= "</tr>\n"; | ||
| 52 | - $sToRender .= "<tr>\n"; | ||
| 53 | - $sToRender .= "</tr>\n"; | ||
| 54 | - $sToRender .= "<td></td><td>" . getDeleteButton($oDocType); | ||
| 55 | - $sToRender .= "<td></td><td>" . getCancelButton($oDocType); | ||
| 56 | - $sToRender .= "</td></table>\n"; | ||
| 57 | - | ||
| 58 | - | ||
| 59 | - return $sToRender; | ||
| 60 | -} | ||
| 61 | - | ||
| 62 | -// show paig if deletion fails | ||
| 63 | -function getPageFail($iDocTypeID) { | ||
| 64 | - global $default; | ||
| 65 | - $oDocType = null; | ||
| 66 | - $oDocField = null; | ||
| 67 | - | ||
| 68 | - if (isset($iDocTypeID)) { | ||
| 69 | - $oDocType = DocumentType::get($iDocTypeID); | ||
| 70 | - } | ||
| 71 | - | ||
| 72 | - $iDocFieldID = DocumentTypeFieldLink::docTypeBelongsToField($iDocTypeID); | ||
| 73 | - | ||
| 74 | - $oDocField= DocumentField::get($iDocFieldID); | ||
| 75 | - | ||
| 76 | - $sToRender .= "<br></br>\n"; | ||
| 77 | - $sToRender .= "<b>Sorry, Removal Failed</b>\n"; | ||
| 78 | - $sToRender .= "<table>\n"; | ||
| 79 | - $sToRender .= "<br></br>\n"; | ||
| 80 | - $sToRender .= "<tr></tr>\n"; | ||
| 81 | - $sToRender .= "</tr>\n"; | ||
| 82 | - $sToRender .= "<tr>\n"; | ||
| 83 | - $sToRender .= "</tr>\n"; | ||
| 84 | - $sToRender .= "<tr>\n"; | ||
| 85 | - $sToRender .= "<td></td><td align = right><a href=\"$default->rootUrl/control.php?action=removeDocTypeFromField\"><img src =\"$default->graphicsUrl/widgets/back.gif\" border = \"0\" /></a></td>\n"; | ||
| 86 | - $sToRender .= "</tr>\n"; | ||
| 87 | - | ||
| 88 | - $sToRender .= "</table>\n"; | ||
| 89 | - | ||
| 90 | - | ||
| 91 | - return $sToRender; | ||
| 92 | -} | ||
| 93 | -// if no DocType selected show selection fail page | ||
| 94 | -function getPageNotSelected() { | ||
| 95 | - global $default; | ||
| 96 | - | ||
| 97 | - $sToRender .= "<br></br>\n"; | ||
| 98 | - $sToRender .= "<b>Sorry, Selection Failed</b>\n"; | ||
| 99 | - $sToRender .= "<table>\n"; | ||
| 100 | - $sToRender .= "<br></br>\n"; | ||
| 101 | - $sToRender .= "<tr></tr>\n"; | ||
| 102 | - $sToRender .= "<tr><td>Please select a Document Type</td></tr>\n"; | ||
| 103 | - $sToRender .= "<tr></tr>\n"; | ||
| 104 | - $sToRender .= "<tr></tr>\n"; | ||
| 105 | - $sToRender .= "<tr>\n"; | ||
| 106 | - $sToRender .= "<td></td><td align = right><a href=\"$default->rootUrl/control.php?action=removeDocTypeFromField\"><img src =\"$default->graphicsUrl/widgets/back.gif\" border = \"0\" /></a></td>\n"; | ||
| 107 | - $sToRender .= "</tr>\n"; | ||
| 108 | - $sToRender .= "</table>\n"; | ||
| 109 | - | ||
| 110 | - | ||
| 111 | - return $sToRender; | ||
| 112 | -} | ||
| 113 | -// show success page if removed from DocField successfully | ||
| 114 | -function getPageSuccess() { | ||
| 115 | - global $default; | ||
| 116 | - | ||
| 117 | - $sToRender .= "<br></br>\n"; | ||
| 118 | - $sToRender .= "<b>Success!</b>\n"; | ||
| 119 | - $sToRender .= "<table>\n"; | ||
| 120 | - $sToRender .= "<br></br>\n"; | ||
| 121 | - $sToRender .= "<tr></tr>\n"; | ||
| 122 | - $sToRender .= "<tr><td>The DocType was successfully removed from the DocField</td></tr>\n"; | ||
| 123 | - $sToRender .= "<tr></tr>\n"; | ||
| 124 | - $sToRender .= "<tr></tr>\n"; | ||
| 125 | - $sToRender .= "<tr>\n"; | ||
| 126 | - $sToRender .= "<td></td><td align = right><a href=\"$default->rootUrl/control.php?action=removeDocTypeFromField\"><img src =\"$default->graphicsUrl/widgets/back.gif\" border = \"0\" /></a></td>\n"; | ||
| 127 | - $sToRender .= "</tr>\n"; | ||
| 128 | - $sToRender .= "</table>\n"; | ||
| 129 | - | ||
| 130 | - | ||
| 131 | - return $sToRender; | ||
| 132 | -} | ||
| 133 | -// show listbox of DocTypes belonging to DocTypes_DocFields_link table | ||
| 134 | -function getDocTypeDisplay($oDocType) { | ||
| 135 | - global $default; | ||
| 136 | - // added clauses to get those DocTypes belonging to the DocumentTypes_Fields_link table | ||
| 137 | - $from = "," . $default->owl_document_type_fields_table . " AS GU"; | ||
| 138 | - $where = "(ST.id = GU.document_type_id)"; | ||
| 139 | - | ||
| 140 | - | ||
| 141 | - if (!isset($oDocType)) { | ||
| 142 | - $oPatternListBox = & new PatternListBox($default->owl_document_types_table, "name", "id", "fDocTypeID"); | ||
| 143 | - $oPatternListBox->setWhereClause($where); | ||
| 144 | - $oPatternListBox->setFromClause($from); | ||
| 145 | - //$oPatternListBox->setIncludeDefaultValue(true); | ||
| 146 | - //$oPatternListBox->setPostBackOnChange(true); | ||
| 147 | - return $oPatternListBox->render(); | ||
| 148 | - } else { | ||
| 149 | - return "<input type=\"hidden\" name=\"fDocTypeID\" value=\"" . $oDocType->iId . "\">\n" . | ||
| 150 | - $oDocType->getName(); | ||
| 151 | - } | ||
| 152 | - | ||
| 153 | -} | ||
| 154 | - | ||
| 155 | -// show DocField details on confirm deletion page | ||
| 156 | -function getDocFieldDisplay($oDocField) { | ||
| 157 | - global $default; | ||
| 158 | - if (!isset($oDocField)) { | ||
| 159 | - //$oPatternListBox = & new PatternListBox($default->owl_DocFields_table, "name", "id", "fDocFieldID"); | ||
| 160 | - //$oPatternLiListBoxstBox->setPostBackOnChange(true); | ||
| 161 | - //return $oPatternListBox->render(); | ||
| 162 | - } else { | ||
| 163 | - return "<input type=\"hidden\" name=\"fDocFieldID\" value=\"" . $oDocField->iId . "\">\n" . | ||
| 164 | - $oDocField->getName(); | ||
| 165 | - } | ||
| 166 | - | ||
| 167 | -} | ||
| 168 | - | ||
| 169 | -// returns the checkbox ticked or unticked | ||
| 170 | -function getIsMandatoryCheckBox($oDocField) { | ||
| 171 | - if (!isset($oDocField)) { | ||
| 172 | - return ""; | ||
| 173 | - } else { | ||
| 174 | - return "<td>Is Mandatory: <input type=\"checkbox\" name=\"fbIsMandatory\">"; | ||
| 175 | - } | ||
| 176 | -} | ||
| 177 | - | ||
| 178 | -// show delete button or select button | ||
| 179 | -function getDeleteButton($oDocType) { | ||
| 180 | - global $default; | ||
| 181 | - if (!isset($oDocType)) { | ||
| 182 | - return "<td align = right><input type=\"image\" src =\"$default->graphicsUrl/widgets/select.gif\" value=\"submit\" border=\"0\"/></td>\n"; | ||
| 183 | - } else { | ||
| 184 | - return "<td align = right><input type=\"image\" src =\"$default->graphicsUrl/widgets/delete.gif\" value=\"submit\" border=\"0\"/></td>\n"; | ||
| 185 | - } | ||
| 186 | -} | ||
| 187 | - | ||
| 188 | -// show cancel button | ||
| 189 | -function getCancelButton($oDocType) { | ||
| 190 | - global $default; | ||
| 191 | - if (!isset($oDocType)) { | ||
| 192 | - //return "<td align = right><a href=\"$default->rootUrl/control.php?action=DocTypeManagement\"><img src =\"$default->graphicsUrl/widgets/cancel.gif\" value=\"cancel\" /></a></td>\n"; | ||
| 193 | - } else { | ||
| 194 | - return "<td align = right><a href=\"$default->rootUrl/control.php?action=removeDocTypeFromDocField\"><img src =\"$default->graphicsUrl/widgets/cancel.gif\" border = \"0\" /></a></td>\n"; | ||
| 195 | - } | ||
| 196 | -} | ||
| 197 | - | ||
| 198 | - | ||
| 199 | -?> | ||
| 200 | \ No newline at end of file | 0 | \ No newline at end of file |