<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:browser="http://namespaces.zope.org/browser"
    xmlns:five="http://namespaces.zope.org/five"
    xmlns:cmf="http://namespaces.zope.org/cmf"
    xmlns:i18n="http://namespaces.zope.org/i18n"
    xmlns:zcml="http://namespaces.zope.org/zcml"
    xmlns:monkey="http://namespaces.plone.org/monkey"
    i18n_domain="senaite.core">

  <monkey:patch
      description="This adds the bika.lims category to controlpanel-overview."
      class="plone.app.controlpanel.overview.OverviewControlPanel"
      original="categories"
      replacement="bika.lims.monkey.controlpanel.overview_controlpanel_categories"
      />

  <monkey:patch
      description="Fix pretty_title_or_id so that messages are translated.  It accepts a domain parameter, which defaults to 'plone'"
      module="Products.CMFPlone.utils"
      original="pretty_title_or_id"
      replacement="bika.lims.monkey.utils.pretty_title_or_id"
      />

  <monkey:patch
      description="Forcibly remove some contentmenu items"
      class="plone.app.contentmenu.menu.FactoriesSubMenuItem"
      original="available"
      replacement="bika.lims.monkey.contentmenu.contentmenu_factories_available"
      />

  <monkey:patch
      description=""
      class="Products.CMFCore.MembershipTool.MembershipTool"
      original="getAuthenticatedMember"
      replacement="bika.lims.monkey.member.getAuthenticatedMember"
      />


  <monkey:patch
      description="Modify isVisible to include more specific widget visibility rules"
      class="Products.Archetypes.Schema.Schemata"
      original="editableFields"
      replacement=".Widget.editableFields"
      />

  <monkey:patch
      description="Modify isVisible to include more specific widget visibility rules"
      class="Products.Archetypes.Widget.TypesWidget"
      original="isVisible"
      replacement=".Widget.isVisible"
      />

    <monkey:patch
      description="Allow field default value acquisition with IAcquireFieldDefaults"
      class="Products.Archetypes.Schema.BasicSchema"
      original="setDefaults"
      replacement=".Schema.setDefaults"
      />

</configure>
