Exemplo n.º 1
0
 def action(self, resource, context, form):
     site_root = context.resource.get_site_root()
     ContactForm.action(self, site_root, context, form)
     # Hook goto
     parent_view_container = self._get_parent_view_container(resource)
     goto = context.get_link(parent_view_container)
     return context.come_back(context.message, goto=goto)
Exemplo n.º 2
0
 def get_namespace(self, resource, context):
     # Hook action, action must be set to contact box uri
     site_root = context.resource.get_site_root()
     namespace = ContactForm.get_namespace(self, site_root, context)
     current_uri = context.uri
     uri = Reference(current_uri.scheme, current_uri.authority,
                     current_uri.path, current_uri.query,
                     current_uri.fragment)
     uri.path = Path(context.get_link(resource))
     namespace['action'] = uri
     return namespace
Exemplo n.º 3
0
 def get_value(self, resource, context, name, datatype):
     site_root = resource.get_site_root()
     return ContactForm.get_value(self, site_root, context, name, datatype)
Exemplo n.º 4
0
 def get_widgets(self, resource, context):
     site_root = resource.get_site_root()
     return ContactForm.get_widgets(self, site_root, context)