Closed (fixed)
Project:
Signup Integration for Ubercart
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Jun 2010 at 22:49 UTC
Updated:
15 Jul 2011 at 19:21 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
faite commentedI had the exact thing happen to me seemingly out of nowhere. People were signing up and suddenly this came up and nomatter what I do I cannot convince the event that the time has in fact not passed.
Comment #2
ezra-g commentedDoes this happen with the latest dev version?
Comment #3
dca123 commentedYes.
Comment #4
dca123 commentedI have fixed it here on my end and made a patch file but it's the first one I've done. Don't know if I did it right or not...
Comment #5
dca123 commentedJust to be specific it doesn't fix faite's issue, just the one I asked about ;)
Comment #6
lunk rat commentedI have REALLY long signup node titles, and when my events pass and it displays this button, the button is five miles past the right margin.
I had to change uc_signup.module to print "Registration is closed" instead of the @type @title variables. Long node titles make huge buttons that break layouts.
Maybe want to consider a UI config option for this text in a future release.
Comment #7
ezra-g commentedI feel like the best solution is to move this text out of the button completely. Here's a patch and a screenshot showing a disabled button that keeps whatever text has been set, and then adds this text below it.
Also, we currently don't disable the button unless the user has entered default "sign up for this event" uc_signup button text at admin/store/products/signup. This patch disables the button regardless of whether that text is entered. Also, I'd like that variable to be set by default, but I'll put that in another issue.
Comment #8
ezra-g commentedComment #9
ezra-g commentedRelated issue: #912792: Provide default value for uc_signup_add_cart_text ..
Comment #10
bewhy commentedI like dcal123's method/patch (as in #4) better simply because adding the line below (as in #8) interferes with my layout. I changed the text to "this event has already happened", which gets around both the problem and the potential for the button to get very big if there is a long node title.
And more generally, I'd rather like to edit the text of the button than add a new line of text.
Comment #11
kclarkson commentedI am having the same issue as well. I am a drupal newbie and would like to add your patch. Could you provide me with a little more info as to what file and "where" to apply your patch.
Also I am trying to get an understanding of "patches" in general. When somebody creates a patch do these get added to the module. It just seems like people always say, "there is a patch that fixes that" but its hard to find them.
thanks,
Comment #12
ezra-g commentedMarked #996330: Remove add to cart form when signups are disabled. as ad duplicate of this.
Comment #13
agentrickardNote also that this should likely disable the entire form, not just the button.
See the attached, which shows the 'variable price' feature form element still active.
Comment #14
YK85 commentedsubscribing
Comment #15
jedsmith13 commentedIt seems to me that the text that should be assigned is that found in the "Signups closed text" field at /admin/store/products/signup. It seems counter productive to ask for some text to put on a button (which sounds like it should cover signups being closed for any reason) and then use hard-coded text instead.
I think something like the suggestion for #8 would be best only instead of just disabling the button used the text entered in the "Signups closed text" field at /admin/store/products/signup. Then on the settings page add a couple of fields where the user could edit the help text displayed with the button, maybe even allow the use of tags like [title] and [type].
Comment #16
ezra-g commentedI've committed a fix for this that takes into account the feedback in this issue:
http://drupalcode.org/project/uc_signup.git/commit/9a1c39d
Some notes:
- Per comment #13, uc_signup already disables $form['qty'] when it's presented to the user and signups cannot be purchased for the node.
- $form['qty'] is always set, it's just that it is a #type=> 'hidden' element when the "Display an optional quantity field in the Add to Cart form." is not enabled at admin/store/settings/products/edit .
- Setting #disabled on the submit and quantity fields are sufficient for preventing form submit handlers from running because even if someone manipulates the DOM to make the elements not disabled, uc_signup_product_add_to_cart_form_validate() still enforces _uc_signup_node_available().
- This revision uses the slightly less evil approach of span + css instead of br tag to make the event closed text appear below the signup/add to cart button by default.
- This patch changes the code_flow of _uc_signup_node_available() to use the user-configured value last, so that it does not get overwritten per comment #15
I committed this change since it seems sufficient and certainly less obviously broken than having markup inside a submit button but am of course open to improving the IA here further.