Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

CanEdit blocking popup


Reply

3 Posts   833 Views

Avatar
Room9

1 March 2011 at 3:26pm Community Member, 19 Posts

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!

Avatar
UncleCheese

1 March 2011 at 3:50pm 4085 Posts

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..

Avatar
Room9

2 March 2011 at 11:43am Community Member, 19 Posts

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!