This topic is locked
[SOLVED]

 trying to hide Inline Add

2/2/2012 11:21:38 PM
PHPRunner General questions
M
mcappel author

I am trying to hide the inline_add on the detail table base on master table value OrderStatus>1. I was able to hide the edit_link and inlineedit_link for each detail row but I can not hide the Inline_ADD button on detail table at all. The following function are used in the respective events
OrdersDetail table: LIST Page:After record Process (to remove icons (add, edit and inlineedit) when details are displayed in master list)

global $strTableName,$dal;

$dal_table = $dal->Table("Orders");

$rstmp = $dal_table->Query("OrderID=".$_SESSION[$strTableName."_masterkey1"],"");

$datatmp = db_fetch_array($rstmp);

if ($datatmp["OrderStatus"]>1)

{

$record["edit_link"]=false;

$record["add_link"]=false;

$record["inlineedit_link"] = false;


OrdersDetail table: LIST Page:Before Display(to delete buttons inline add, editselected and deletselected)

global $strTableName,$dal;

$dal_table = $dal->Table("Orders");

$rstmp = $dal_table->Query("OrderID=".$_SESSION[$strTableName."_masterkey1"],"");

$datatmp = db_fetch_array($rstmp);

if ($datatmp["OrderStatus"]>1)

{

$xt->assign["editselected_link"] = false;

$xt->assign("deleteselected_link",false);

$xt->assign["inlineadd_link"] = false;

}


When I go to the OrderDetail_list page the deletselected link is the only one that is not shown, the other ones still available.
Any idea, i even try doing only $xt->assign["inlineadd_link"] = false; as before display event and it does not work.
I am using 6.0 version

Help

Regards

Mauro

D
danaci 2/3/2012

mcappel,

correct code

$rstmp = $dal_table->Query("OrderID='".$_SESSION[$strTableName."_masterkey1"]."'");

and
$xt->assign("editselected_link",false);