2008/9/2 Javier Andrés Mansilla <[EMAIL PROTECTED]>: > > Hi there people. > > I worked on the States widget, mainly trying that if the field is > required, and the user leace the default (no values) selected, nothing > explodes, but instead a default form error is displayed. > For doing this, I added 3 more special values: > * Not applicable: for countries like Nuie which don't have states. > This spacial value it's on the vocabulary > * a special (no values) that is used only when the field is not > required. This it's also on the vocabulary, so, there's no problem to > leave it on the form selected > * a second (no values) that is used only when the field is not > required. As this one is not on the vocabulary, when validating will > report an error. > > I also removed the template used, and now the widget inherits directly > from DropDownWidget and uses a __call__ method for generating it's > html > > What else? > The CountrySelectWidget had some javascript code on it's template, > that wasn't working fine on IE7. I made some changes there, appending > calls to the onload event instead of just trying to run javascript > code while loading tha page. > > That's what I did and what I'm going to check in soon. Before > uploading my work, I want to consult you people about a couple of > thing related with usability of the widget for browsers that don't > have javascript: > > The StateSelectionWidget does some magic trying to discover if in the > request.form there are some values that indicates that the user > already selected some country, and in that case, only displays that > country states. The problem is that if the magic fails, then is using > UnitedStates by default, so, only US states are loaded. So, > non-javascript users won't be able to select states of another > countries. > > I made a patch to this, but I wanted to have you noticed before > checking in the code. > > Regards. > > P.S.: I'll be glad to hear from you Maurits :-) > > -- > Javier Mansilla -- http://except.com.ar > Free software developers for hire. > > > >
Great job javi, do not forget to update the related bug report . -- perrito --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "getpaid-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en -~----------~----~----~----~------~----~------~--~---
