Hiding add/reordering buttons in the grid widget

A place for users and developers of the Xataface to discuss and receive support.

Hiding add/reordering buttons in the grid widget

Postby alexchet » Fri Sep 16, 2011 4:35 am

Hi,
I use grid widget to edit related records. I want hide Add (+) and Reorder buttons and show only Delete one. Is there any way to do that?
alexchet
 
Posts: 5
Joined: Fri Sep 16, 2011 4:07 am

Re: Hiding add/reordering buttons in the grid widget

Postby shannah » Fri Sep 16, 2011 9:45 am

You can either use CSS or permissions. If the user is not granted the reorder_related_records permission for that relationship then they should disappear. Alternatively you can just look at the HTML and figure out the css to hide the buttons.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Hiding add/reordering buttons in the grid widget

Postby alexchet » Sat Sep 17, 2011 7:24 pm

Thanks for the answer!
Unfortunately class HTML_QuickForm_grid does not check reorder_related_records permission :(
So I have to replace
Code: Select all
var $reorder=true;
with
Code: Select all
var $reorder=false;

at line 22 grid.php and got what I need.
alexchet
 
Posts: 5
Joined: Fri Sep 16, 2011 4:07 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 80 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved