<configure xmlns="http://namespaces.zope.org/zope"
           xmlns:browser="http://namespaces.zope.org/browser"
           xmlns:five="http://namespaces.zope.org/five"
           xmlns:kss="http://namespaces.zope.org/kss"
           >

    <!-- Include command macro definitions -->
    <include package=".commands"/>

    <browser:page
        for="Products.Archetypes.interfaces.IBaseObject"
        attribute="kssValidateField"
        class=".validation.ValidationView"
        name="kssValidateField"
        permission="cmf.ModifyPortalContent"
        />

    <browser:page
        for="Products.Archetypes.interfaces.IBaseObject"
        attribute="kssValidateForm"
        class=".validation.ValidationView"
        name="kssValidateForm"
        permission="cmf.ModifyPortalContent"
        />

    <browser:page
        for="Products.Archetypes.interfaces.IBaseObject"
        class=".fields.FieldsView"
        name="replaceField"
        attribute="replaceField"
        permission="zope.Public"
      />

    <browser:page
        for="Products.Archetypes.interfaces.IBaseObject"
        class=".fields.FieldsView"
        name="replaceWithView"
        attribute="replaceWithView"
        permission="zope.Public"
      />

    <browser:page
        for="Products.Archetypes.interfaces.IBaseObject"
        class=".fields.FieldsView"
        name="saveField"
        attribute="saveField"
        permission="cmf.ModifyPortalContent"
      />

    <browser:page
        for="Products.ATContentTypes.interface.IATDocument"
        class=".fields.ATDocumentFieldsView"
        name="replaceField"
        attribute="replaceField"
        permission="zope.Public"
      />

    <browser:page
        for="Products.ATContentTypes.interface.IATDocument"
        class=".fields.ATDocumentFieldsView"
        name="replaceWithView"
        attribute="replaceWithView"
        permission="zope.Public"
      />

    <browser:page
        for="Products.ATContentTypes.interface.IATDocument"
        class=".fields.ATDocumentFieldsView"
        name="saveField"
        attribute="saveField"
        permission="cmf.ModifyPortalContent"
      />

    <adapter
        for="Products.Archetypes.interfaces.IBaseObject
             zope.publisher.interfaces.http.IHTTPRequest"
        provides="archetypes.kss.interfaces.IInlineEditingEnabled"
        factory=".fields.InlineEditingEnabledView"
        permission="zope2.View"
      />

    <!-- field decorator (non-ajax) views -->

    <browser:page
        for="Products.Archetypes.interfaces.IBaseObject"
        name="kss_field_decorator_view"
        permission="zope2.View"
        class=".fields.ATFieldDecoratorView"
        allowed_attributes="getKssUIDClass getKssClassesInlineEditable getKssClasses"
        />

    <!-- event listener for versioning of inline edit -->

    <subscriber handler=".fields_versioning.versionObjectBecauseFieldChanged"/>

</configure>
