diff --git a/news/83.bugfix b/news/83.bugfix new file mode 100644 index 0000000..d2c8c4d --- /dev/null +++ b/news/83.bugfix @@ -0,0 +1 @@ +The dexterity editor does not allow editing portal types derived by a schema because that has no persistent effect \ No newline at end of file diff --git a/plone/schemaeditor/browser/schema/listing.py b/plone/schemaeditor/browser/schema/listing.py index 6a6152e..dde0105 100644 --- a/plone/schemaeditor/browser/schema/listing.py +++ b/plone/schemaeditor/browser/schema/listing.py @@ -29,6 +29,7 @@ class SchemaListing(AutoExtensibleForm, form.Form): showEmptyGroups = True template = ViewPageTemplateFile('schema_listing.pt') ignoreRequiredOnExtract = True + read_only = False @property def schema(self): @@ -136,11 +137,14 @@ def handleSaveDefaults(self, action): class ReadOnlySchemaListing(SchemaListing): buttons = button.Buttons() + read_only = True def edit_url(self, field): return delete_url = edit_url + def protected_field(self, field): + return True class SchemaListingPage(FormWrapper): diff --git a/plone/schemaeditor/browser/schema/schema_listing.pt b/plone/schemaeditor/browser/schema/schema_listing.pt index a433394..bc8759e 100644 --- a/plone/schemaeditor/browser/schema/schema_listing.pt +++ b/plone/schemaeditor/browser/schema/schema_listing.pt @@ -1,18 +1,24 @@
- - - - - - - + tal:define="read_only python:view.read_only" + tal:omit-tag="" + i18n:domain="plone" +> + + + + + + + + + +