From 34c9d5b6554ff521f78bac355fbeb1e49547aee3 Mon Sep 17 00:00:00 2001 From: atisne Date: Thu, 24 Sep 2020 14:30:15 +0200 Subject: [PATCH] fix: Add/remove keyword on Test Suite fails Context (test project ID) is missing when a granted user wants to add/remove a keyword on a Test Suite. Add the test project ID on the requests used to add/remove keywords. --- .../tl-classic/testcases/object_keywords.inc.tpl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gui/templates/tl-classic/testcases/object_keywords.inc.tpl b/gui/templates/tl-classic/testcases/object_keywords.inc.tpl index 8b9e9b6592..7146bd6dcb 100644 --- a/gui/templates/tl-classic/testcases/object_keywords.inc.tpl +++ b/gui/templates/tl-classic/testcases/object_keywords.inc.tpl @@ -20,12 +20,12 @@ var remove_kw_msgbox_title = '{$remove_kw_msgbox_title|escape:'javascript'}'; * * */ -function keyword_remove_confirmation(item_id, kw_link_id, keyword, title, msg, pFunction) { +function keyword_remove_confirmation(item_id, kw_link_id, keyword, title, msg, pFunction, project_id) { var my_msg = msg.replace('%i',keyword); var safe_title = escapeHTML(title); Ext.Msg.confirm(safe_title, my_msg, function(btn, text) { - pFunction(btn,text,item_id,kw_link_id); + pFunction(btn,text,item_id,kw_link_id,project_id); }); } @@ -34,9 +34,9 @@ function keyword_remove_confirmation(item_id, kw_link_id, keyword, title, msg, p * * */ -function remove_keyword(btn, text, item_id, kw_link_id) { +function remove_keyword(btn, text, item_id, kw_link_id, project_id) { var my_action = fRoot + 'lib/testcases/containerEdit.php?doAction=removeKeyword&item_id=' - + item_id + '&kw_link_id=' + kw_link_id; + + item_id + '&kw_link_id=' + kw_link_id + '&tproject_id=' + project_id; if( btn == 'yes' ) { window.location=my_action; } @@ -51,6 +51,7 @@ var pF_remove_keyword = remove_keyword; + {$kwView = $gsmarty_href_keywordsView|replace:'%s%':$gui->tproject_id} @@ -67,7 +68,7 @@ var pF_remove_keyword = remove_keyword; {$kw_link_item.kw_link}, '{$kw_link_item.keyword|escape:'javascript'}', remove_kw_msgbox_title, remove_kw_msgbox_msg, - pF_remove_keyword);"> + pF_remove_keyword,{$gui->tproject_id});"> {/if}