Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have to extend the wish list with a type, i.e. birthday, wedding, etc. People can specify and change this type when creating a wish list.
The purpose is to allow styling to be done based on the wish list type.
As this seems to me a generically useful feature, are people interested in a patch?
Comment | File | Size | Author |
---|---|---|---|
#11 | uc_wishlist-add-wishlist-type-2397457-11.patch | 4.79 KB | berenddeboer |
#4 | interdiff-3-4.txt | 1 KB | naveenvalecha |
#4 | uc_wishlist-add-wishlist-type-2397457-4.patch | 4.79 KB | naveenvalecha |
#3 | uc_wishlist-add-wishlist-type-2397457-3.patch | 4.53 KB | berenddeboer |
Comments
Comment #1
naveenvalechaAdded parent issue.Will need to discuss about this feature with @Jay and will update here that we are going to add this feature in the module.
Comment #2
berenddeboer CreditAttribution: berenddeboer commentedComment #3
berenddeboer CreditAttribution: berenddeboer commentedHere is the patch: in the settings you can specify types. Only if you have setup types, a user can see/select them. Type is emitted as class in the form. More useful would be to have the class in the body, but that depends on your particular theme or other support modules which may make that easy.
Comment #4
naveenvalechaThanks @berenddeboer, for writing up the patch.Rerolled the patch with below changes.
@Jay it seems ready to go.Would you review it because it contains little bit my code as well.
Need to sanitize the $type variable here using check_plain.One more thing only strict literals should be passed to t as per coding standards.
$types variable two times. Need to remove once
Comment #7
naveenvalechaChanging the version so that testbot will take a look at it.
Comment #10
naveenvalechaComment #11
berenddeboer CreditAttribution: berenddeboer commentedComment #12
berenddeboer CreditAttribution: berenddeboer commentedThanks for the quick review, and catching my mistakes, always a pleasure working with you!
Have attached one more fix: if a user enters a space on a line, you get an option with a space, and Drupal doesn't like that, you get "illegal choice detected" so added a trim.
Comment #13
naveenvalecha