Esempio 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.'))
Esempio 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.'))
Esempio 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
Esempio 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