*** replaceafill has quit IRC | 01:18 | |
*** replaceafill has joined #schooltool | 01:30 | |
*** replaceafill has quit IRC | 01:31 | |
*** menesis has quit IRC | 03:14 | |
*** replaceafill has joined #schooltool | 05:49 | |
*** replaceafill has quit IRC | 07:17 | |
*** replaceafill has joined #schooltool | 07:27 | |
*** replaceafill has quit IRC | 07:29 | |
*** menesis has joined #schooltool | 09:22 | |
*** yvl has joined #schooltool | 10:06 | |
*** dadeng has joined #schooltool | 12:15 | |
*** dadeng has quit IRC | 12:19 | |
*** dadeng has joined #schooltool | 12:21 | |
*** dadeng has quit IRC | 12:58 | |
*** dadeng has joined #schooltool | 13:00 | |
*** dadeng has quit IRC | 13:38 | |
*** dadeng has joined #schooltool | 13:41 | |
*** replaceafill has joined #schooltool | 13:49 | |
replaceafill | yvl, you around? | 13:49 |
---|---|---|
yvl | yes :) | 13:54 |
yvl | hi :) | 13:54 |
replaceafill | hey yvl | 13:54 |
replaceafill | have a few minutes (like 10)? :) | 13:55 |
yvl | sure! | 13:55 |
replaceafill | which will become like 50 :P | 13:55 |
replaceafill | well | 13:55 |
replaceafill | i'm wondering | 13:55 |
replaceafill | i have a messed edit form | 13:56 |
replaceafill | which uses a subform :/ | 13:56 |
replaceafill | i get a validation error in the subform | 13:56 |
replaceafill | but i dont know how to handle it in the edit form | 13:56 |
* replaceafill confuses himself explaining it... | 13:56 | |
yvl | don't worry - z3c.form 1.2.x (the one we use) has very crapy subform base class | 13:57 |
replaceafill | is there any way to tell the main form to handle the subform errors? | 13:58 |
replaceafill | the action handler for the main form succeeds, so it doesnt say "there was an error" | 13:59 |
yvl | I remember that it was messy | 13:59 |
replaceafill | :( | 13:59 |
yvl | there should even be XXX in contact/browser/contact.py | 13:59 |
replaceafill | i guess the subform in contact doesnt handle errors | 14:00 |
replaceafill | # XXX: we don't handle errors for now | 14:00 |
replaceafill | :) | 14:00 |
yvl | oh yes, that one :) | 14:00 |
yvl | I think they made base class better in z3c.form 2.x.x | 14:00 |
replaceafill | :O | 14:00 |
yvl | (and we'll using that one some time soon) | 14:01 |
replaceafill | could i move cambodia to 2.x.x | 14:01 |
replaceafill | using [versions] | 14:01 |
replaceafill | and it's a tiny problem actually | 14:01 |
replaceafill | the phone number for them has to be 9-10 digits | 14:01 |
replaceafill | the add form validations works for the phone number because the addform doesnt use subforms | 14:02 |
replaceafill | the edit form does | 14:02 |
replaceafill | you cannot edit phone numbers :P | 14:02 |
yvl | :))) | 14:03 |
yvl | well, you can always work around it | 14:03 |
yvl | gimme a moment... | 14:03 |
replaceafill | sure | 14:03 |
*** dadeng has quit IRC | 14:08 | |
*** dadeng has joined #schooltool | 14:09 | |
yvl | I'm back | 14:14 |
yvl | you know, just write your own handleAdd | 14:14 |
yvl | and do data, errors = self.extractData() | 14:14 |
yvl | for the form and the sub-form | 14:14 |
replaceafill | you mean in both of them? | 14:15 |
replaceafill | or just the main? | 14:15 |
yvl | on the main should be enough | 14:15 |
replaceafill | can i access the subform data from the main? | 14:16 |
yvl | you should be able to | 14:16 |
replaceafill | ok, i'll try | 14:17 |
replaceafill | thanks yvl | 14:17 |
yvl | umm, to compensate for my erratic writing skills: | 14:18 |
yvl | basically copy the handleAdd from z3c.form.form.EditForm | 14:19 |
yvl | and instead of just extracting data from self | 14:19 |
yvl | data, errors = self.extractData() | 14:19 |
yvl | subform_data, subform_errors = self.subform.extractData() | 14:20 |
yvl | and proceed with applying changes only if no subform errors | 14:20 |
replaceafill | the main form handler comes after the main form update method? | 14:21 |
replaceafill | because my subform gets updated there (main update) | 14:21 |
replaceafill | well, i'll try | 14:21 |
yvl | well, your subform should take care of everythin | 14:22 |
yvl | (it should render itself along with errors, and omit changes if there are errors) | 14:23 |
replaceafill | yvl, eeeeeeeeeeeeeehhhhhhhhhhhhhh :D | 14:37 |
replaceafill | it worked :) | 14:37 |
yvl | congratulations ;) | 14:37 |
replaceafill | i just had to break the main update (updatewidgets, updateactions, executeactions) | 14:37 |
replaceafill | main.update() does the three at once | 14:38 |
replaceafill | and the subform wasnt accesible for the actions | 14:38 |
replaceafill | i just put executeactions at the end and zas! it worked :) | 14:38 |
replaceafill | ugly ugly ugly | 14:38 |
replaceafill | :P | 14:38 |
replaceafill | although most cambodia is ;) | 14:38 |
replaceafill | thanks yvl | 14:39 |
yvl | don't give me too much credit ;) | 14:40 |
yvl | but yeah, that part of subforms is ugly | 14:41 |
yvl | we'll have to write our own base classes some time | 14:41 |
yvl | because seriously - assigning css styles to actions and handling subforms is crappy now | 14:41 |
replaceafill | definitely | 14:42 |
*** Aiste has joined #schooltool | 14:58 | |
*** povbot has joined #schooltool | 15:32 | |
*** dadeng has quit IRC | 15:36 | |
*** menesis has quit IRC | 16:21 | |
*** dadeng has joined #schooltool | 16:28 | |
*** dadeng has quit IRC | 16:46 | |
*** dadeng has joined #schooltool | 16:48 | |
*** dadeng has quit IRC | 16:52 | |
*** dadeng has joined #schooltool | 16:54 | |
*** dadeng has quit IRC | 16:54 | |
*** dadeng has joined #schooltool | 16:54 | |
*** dadeng has quit IRC | 16:58 | |
*** dadeng has joined #schooltool | 16:58 | |
*** menesis has joined #schooltool | 17:09 | |
*** dadeng has quit IRC | 17:12 | |
*** replaceafill has joined #schooltool | 17:32 | |
*** Aiste has quit IRC | 18:23 | |
*** dadeng has joined #schooltool | 18:56 | |
*** dadeng has quit IRC | 19:01 | |
*** dadeng has joined #schooltool | 19:02 | |
*** dadeng has quit IRC | 19:06 | |
*** dadeng has joined #schooltool | 19:08 | |
*** dadeng has quit IRC | 19:12 | |
*** ColonelPanik has joined #schooltool | 19:37 | |
*** ColonelPanik has left #schooltool | 19:41 | |
*** replaceafill has quit IRC | 20:09 | |
*** jelkner has joined #schooltool | 22:00 | |
*** jelkner has quit IRC | 22:37 | |
*** replaceafill has joined #schooltool | 23:51 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!