quantumlicht / django-wine

Django version of Site vins
3 stars 1 forks source link

Review Teint Api call in core.js #56

Closed quantumlicht closed 10 years ago

quantumlicht commented 10 years ago

Maybe we should have the teint api accept a parameter to filter the options.

Since the wineType no longer has a default option set, how do we decide which teint to show?

  1. When there is nothing clicked display both colors,
  2. If the user later click the wineType, check if the type he selected is part of the list.

    2a. If yes, leave is choice as is, and clean the teint that are for the other wineTypes. 2b. else, put a blank choice and clean the teint that are for the other wineTypes, so the form wont validate unless he sets it himself. Also notify him by highlighting the form input with a warning class, that he needs to set this correctly.