Commit f92c8095e30fa59b566d4e0a3cd18f0054647341
1 parent
1b9c5618
added querystring to statusPage method and updated calls from removeGroup
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2456 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
7 additions
and
7 deletions
presentation/Html.inc
| ... | ... | @@ -23,7 +23,7 @@ function renderHeading($sHeading, $sSectionName = "") { |
| 23 | 23 | return $sToRender; |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | -function statusPage($sTitle, $sHeading, $sCancelAction, $sText = "") { | |
| 26 | +function statusPage($sTitle, $sHeading, $sText = "", $sCancelAction, $sQueryString = "") { | |
| 27 | 27 | global $default; |
| 28 | 28 | $sToRender .= renderHeading($sTitle); |
| 29 | 29 | $sToRender .= "<table>\n"; |
| ... | ... | @@ -31,7 +31,7 @@ function statusPage($sTitle, $sHeading, $sCancelAction, $sText = "") { |
| 31 | 31 | $sToRender .= "<td><b>$sHeading</b></td>\n"; |
| 32 | 32 | $sToRender .= "</tr>\n"; |
| 33 | 33 | $sToRender .= "<tr><td>$sText</td></tr>\n"; |
| 34 | - $sToRender .= "<tr><td align=\"right\">" . generateControllerLink("listGroups", "", "<img src =\"$default->graphicsUrl/widgets/back.gif\" border=\"0\"/>") . "</td></tr>\n"; | |
| 34 | + $sToRender .= "<tr><td align=\"right\">" . generateControllerLink($sCancelAction, $sQueryString, "<img src =\"$default->graphicsUrl/widgets/back.gif\" border=\"0\"/>") . "</td></tr>\n"; | |
| 35 | 35 | $sToRender .= "</table>\n"; |
| 36 | 36 | return $sToRender; |
| 37 | 37 | } | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/groupmanagement/removeGroupBL.php
| ... | ... | @@ -31,22 +31,22 @@ if (checkSession()) { |
| 31 | 31 | if (isset($fForDelete)) { |
| 32 | 32 | if ($oGroup->delete()) { |
| 33 | 33 | // FIXME: refactor getStatusPage in Html.inc |
| 34 | - $oPatternCustom->setHtml(statusPage("Remove Group", "Group successfully removed!", "listGroups")); | |
| 34 | + $oPatternCustom->setHtml(statusPage("Remove Group", "Group successfully removed!", "", "listGroups")); | |
| 35 | 35 | } else { |
| 36 | - $oPatternCustom->setHtml(statusPage("Remove Group", "Group deletion failed!", "listGroups", "There was an error deleting this group. Please try again later.")); | |
| 36 | + $oPatternCustom->setHtml(statusPage("Remove Group", "Group deletion failed!", "There was an error deleting this group. Please try again later.", "listGroups")); | |
| 37 | 37 | } |
| 38 | 38 | } else { |
| 39 | 39 | $oPatternCustom->setHtml(getDeletePage($fGroupID)); |
| 40 | 40 | $main->setFormAction($_SERVER["PHP_SELF"] . "?fForDelete=1"); |
| 41 | 41 | } |
| 42 | 42 | } else { |
| 43 | - $oPatternCustom->setHtml(statusPage("Remove Group", "This group is in a unit!", "listGroups", "This group can not be deleted because it belongs to a unit.")); | |
| 43 | + $oPatternCustom->setHtml(statusPage("Remove Group", "This group is in a unit!", "This group can not be deleted because it belongs to a unit.", "listGroups")); | |
| 44 | 44 | } |
| 45 | 45 | } else { |
| 46 | - $oPatternCustom->setHtml(statusPage("Remove Group", "This group has users!", "listGroups", "This group can not be deleted because there are still users in it.")); | |
| 46 | + $oPatternCustom->setHtml(statusPage("Remove Group", "This group has users!", "This group can not be deleted because there are still users in it.", "listGroups")); | |
| 47 | 47 | } |
| 48 | 48 | } else { |
| 49 | - $oPatternCustom->setHtml(statusPage("Remove Group", "No group was selected for deletion", "listGroups")); | |
| 49 | + $oPatternCustom->setHtml(statusPage("Remove Group", "No group was selected for deletion", "", "listGroups")); | |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | $main->setCentralPayload($oPatternCustom); | ... | ... |