You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement page for user to submit assets information (#1911)
* Add missing migrations after changes on the field names and texts
* Add new benefit feature to flag benefits with required image assets
* Add new configuration to admin
* Validate min/max ranges
* Model class to hold generic img assets
* Use UUID to format file paths
* Add new class to require text inputs
* Add asset to store text input from user
* Do not use UUID field as primary key
Django polymorphic does not work with non-integer ids
* Move benefit feature creation to specific method under feature cfg
* Remove duplicated tests
* Create empty ImgAsset during sponsorship creation
* Create empty TextAsset during sponsorship creation
* Check if asset relates to sponsor or sponsorship before creating it
* Add generic relation to iter over all assets from sponsor/sponsorship models
* Assets base models Meta should inherit too
* Prevent same required asset from being created twice
* Optimizes query to list sponsorship benefits
* List sponsorship assets under sponsor/sponsorship detail admin
* Add extra card on sponsorship detail page to link to assets form
* Revert "Add extra card on sponsorship detail page to link to assets form"
This reverts commit 30a8672.
* Add extra card on sponsorship detail page to link to assets form
* Isolate customization on how to create a benefit feature in a mixin
Without that change, an RequiredImgAsset feature was able to call the
create_benefit_feature method and this is wrong, since only the feature
configuration objects should be able to create benefit features.
* Create helper manager to operate on top of benefit features
* Implement a higher level API to get assets values from the required assets model
* Minimal dynamic form construction
* Every asset should have an input label and an optional help text
* Unit test form field
* Add test to make sure of field names
* Add missing directory slash and remove duplicated extension
* Implement method to update assets with information uploaded from the user
* Refactor to use Python properties instead of Java-ish get/set methods
* Make sure initials are being populated and add property to check if form has inputs
* If field has initial data, it shouldn't be removed.
* Refactor how initial is being populated so widgets can work properly
Widgets only consider a field as required if this flag was passed to the
field during creation time. So, this PR refactors the as_form_field methods
to accept parameters so the form initialization can control required fields
* Refactor form to use init and, thus, to expose a more Django-ish API
* Implement view to update sponsor assets
* Update HTML/CSS to display assets form
* Print logo should be an image field too
* Update migrations dependencies after merge with main branch
* Build form with for specific asset via querystring
* Update sponsorship detail to separate fulfilled from pending assets
* Display links to specific assets at the sponsorship detail page
* Add links for user to submit required assets in the new sponsorship application notification
* Customize message if assets form with no fields due to unexisting required asset
0 commit comments