web/views/editforms.py
branchtls-sprint
changeset 1138 22f634977c95
parent 1135 00eb43688a57
child 1147 402e8a8b1d6a
equal deleted inserted replaced
1135:00eb43688a57 1138:22f634977c95
   101     
   101     
   102     def __init__(self, *args, **kwargs):
   102     def __init__(self, *args, **kwargs):
   103         super(AutomaticEntityForm, self).__init__(*args, **kwargs)
   103         super(AutomaticEntityForm, self).__init__(*args, **kwargs)
   104         self.entity.complete()
   104         self.entity.complete()
   105         for rschema, target in self.editable_attributes(self.entity):
   105         for rschema, target in self.editable_attributes(self.entity):
   106             field = guess_field(entity.__class__, self.entity.e_schema, rschema, target)
   106             field = guess_field(self.entity.__class__, self.entity.e_schema,
       
   107                                 rschema, target)
   107             self.fields.append(field)
   108             self.fields.append(field)
   108             
   109             
   109     def form_buttons(self):
   110     def form_buttons(self):
   110         return [self.button_ok(tabindex=self.req.next_tabindex()),
   111         return [self.button_ok(tabindex=self.req.next_tabindex()),
   111                 self.button_apply(tabindex=self.req.next_tabindex()),
   112                 self.button_apply(tabindex=self.req.next_tabindex()),