7921 Posts in 1359 Topics by 933 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » CanEdit blocking popup
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 656 Views |
-
CanEdit blocking popup

1 March 2011 at 3:26pm
Hi,
I have ModelAdmin with several CMS tabs to view data for my DataObject. It's read-only so CanEdit is set to false.
When I use DOM to view associated records I can't get the details popup to display in this mode, when I switch CanEdit to true the popup shows. When I leave CanEdit as false and use ComplexTableField instead I do get the read-only popup. But the DOM looks so much nicer!
I tried using $dom->setPermissions(array('view')); but it makes no difference.
How can I get the Popup to show in read-only mode?
Thanks!
-
Re: CanEdit blocking popup

1 March 2011 at 3:50pm
Hmm.. I'm not able to replicate that. When I use:
$myDOM->setPermissions(array('view'));
I get a readonly form. This is a regular DOM? Not a FileDOM or anything? Shouldn't make a difference anyway, but I was testing with a regular DOM..
-
Re: CanEdit blocking popup

2 March 2011 at 11:43am
Hi UncleCheese!
I've created an example here: http://www.pastie.org/1622553. You should be able to add this to a SS install and check in the CMS.
If I comment out the 'public function canEdit() {return false;}' I get the popup, otherwise I don't. Would love to have a readonly popup.
Cheers!
| 656 Views | ||
|
Page:
1
|
Go to Top |

