Exemplo n.º 1
0
 def action_on_success(self, resource, context):
     # XXX Set image as public
     form = Table_AddRecord._get_form(self, resource, context)
     path = form['name']
     img_resource = resource.get_resource(str(path))
     img_resource.set_property('state', 'public')
     return context.come_back(MSG(u'New record added.'))
Exemplo n.º 2
0
 def action_on_success(self, resource, context):
     # XXX Set image as public
     form = Table_AddRecord._get_form(self, resource, context)
     path = form['name']
     img_resource = resource.get_resource(str(path))
     img_resource.set_property('state', 'public')
     return context.come_back(MSG(u'New record added.'))
Exemplo n.º 3
0
 def _get_form(self, resource, context):
     form = Table_AddRecord._get_form(self, resource, context)
     # We check if the image path refer to an Image instance
     path = form['name']
     check_photo(path, resource, 'name')
     return form
Exemplo n.º 4
0
 def _get_form(self, resource, context):
     form = Table_AddRecord._get_form(self, resource, context)
     # We check if the image path refer to an Image instance
     path = form['name']
     check_photo(path, resource, 'name')
     return form